telegram-bot-api
telegram-bot-api copied to clipboard
how can i receive channels and groups messages
Hi, i use updates := bot.GetUpdatesChan(updateConfig)
and loop update := range updates
and i get only direct messages, how can i get messages users send in groups or channels?
@no-1imit Did you manage to solve this problem? Thx
to get updates from channels use u := tgbotapi.NewUpdate(0) u.AllowedUpdates = []string{"channel_post"}
to access the messages in your for loop use update.ChannelPost