Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how can i receive channels and groups messages #555

Open
no-1imit opened this issue May 20, 2022 · 2 comments
Open

how can i receive channels and groups messages #555

no-1imit opened this issue May 20, 2022 · 2 comments

Comments

@no-1imit
Copy link

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?

@nickRiNi
Copy link
Contributor

nickRiNi commented Aug 4, 2022

@no-1imit Did you manage to solve this problem? Thx

@appleGun22
Copy link

appleGun22 commented Aug 15, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants