0
votes
3
comments

[Bug] Telegram OnTelegramMessageReceivedCh negative CHAT_ID

Suggested by: irondrake ()
[Bug] Telegram OnTelegramMessageReceivedCh

Hi,

I'm trying to receive messages on a script from a telegram group by using the "OnTelegramMessageReceivedCh" event but it seems to not work properly when the CHAT_ID is a negative number

However, I can still receive notifications on telegram group

OnTelegramMessageReceivedCh works properly when CHAT_ID is a positive number
Deleted

notriv ()

not a suggestion

irondrake ()

for anyone interested:

I was able to workaround it by calling SendTelegram with my desired chat_id, and calling it on any script by using Get, just like this:

l_telegram_id, _ = Get("CUSTOM_TELEGRAM_ID")

l_msgstr="List of own planets: \n"
for celestial in GetCachedCelestials() {
l_resources = celestial.GetResources()
// "ID: " + celestial.GetID() + " " +
l_msgstr = l_msgstr + celestial.GetName() + " " + celestial.GetCoordinate() + " Res: " + l_resources + "\n"
}

SendTelegram( l_telegram_id,l_msgstr)

irondrake ()

Forgot to mention, I'm using a self-hosted bot