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
OnPinned Cannot Listen From Channel Auto Pinned Message #244
Comments
You're right. I will fix it in |
@demget thanks |
@demget Still can't monitor the pinned notifications of channel-linked groups |
My current solution
disEvent := []string{tb.OnPhoto, tb.OnAudio, tb.OnDocument,
tb.OnSticker, tb.OnVideo, tb.OnVoice, tb.OnVideoNote, tb.OnContact,
tb.OnLocation, tb.OnVenue}
exists, _ := In_array(OnEvent, disEvent)
if m.Sender.ID == 777000 {
b.Pin(&tb.Message{ID: pinnedMessageID, Chat: m.Chat})
return
} |
du5
added a commit
to du5/telebot
that referenced
this issue
Jun 5, 2020
Closed
if m.Sender != nil && (m.Sender.ID == 777000 && (m.Chat.Type == ChatGroup || m.Chat.Type == ChatSuperGroup)) {
b.handle(OnPinned, m)
return
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
telebot/telebot.go
Line 51 in 7eeea8f
The text was updated successfully, but these errors were encountered: