You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public class MyBot extends TelegramLongPollingBot {
@Override
public void onUpdateReceived(Update update) {
System.out.println("we have an update!");
...
That prints we have an update! just fine when it's me (a user) sending a message to a channel. But if the sender is that same bot, it doesn't react (doesn't print anything). Is there a way to cope with it? I need the bot to react to messages (print we have an update) that it has sent.
I send messages using execute method with chat_id set to the channel's id. The messages the bot sents to the channel, get displayed as sent under the channel's name.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
I have this method:
That prints
we have an update!
just fine when it's me (a user) sending a message to a channel. But if the sender is that same bot, it doesn't react (doesn't print anything). Is there a way to cope with it? I need the bot to react to messages (printwe have an update
) that it has sent.I send messages using
execute
method withchat_id
set to the channel's id. The messages the bot sents to the channel, get displayed as sent under the channel's name.The text was updated successfully, but these errors were encountered: