this is my code
private async void Bot_OnMessage(object sender, Telegram.Bot.Args.MessageEventArgs e)
{
var message = e.Message; if (message == null || message.Type != MessageType.Text) return; await Bot.SendTextMessageAsync(message.Chat.Id, "Hello?");
in this case, it works well with super groups
but await Bot.SendTextMessageAsync([supergroup chat id], "Hello?");
put Super Group ID in here[supergroup chat id], it won't work. I've set up all the group permissions. After upgrading the super group, I had to drop the bot and invite again
Just in case if you are haven't figured it out already... When a group is upgraded to supergroup, new ID is generated:
{
"ok": false,
"error_code": 400,
"description": "Bad Request: group chat was upgraded to a supergroup chat",
"parameters": {
"migrate_to_chat_id": -1001432162429
}
}
Use this migrate_to_chat_id to send messages
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With