Skip to content

Commit

Permalink
feat(bot): add channel handlers
Browse files Browse the repository at this point in the history
  • Loading branch information
iyear committed Jul 13, 2022
1 parent d15587c commit 638f437
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/bot/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ func makeHandlers(bot *tele.Bot, button *i18n.TemplateButton) {
p.Handle(&button.Settings.LanguagePlain, private.SettingsSwitchLanguage)
}

// group handlers
bot.Handle(tele.OnText, handler.OnText)
bot.Handle(tele.OnPhoto, grchan.Index)
bot.Handle(tele.OnVideo, grchan.Index)
Expand All @@ -37,6 +38,10 @@ func makeHandlers(bot *tele.Bot, button *i18n.TemplateButton) {
bot.Handle(tele.OnAnimation, grchan.Index)
bot.Handle(tele.OnEdited, grchan.Index)

// channel handlers
bot.Handle(tele.OnChannelPost, grchan.Index)
bot.Handle(tele.OnEditedChannelPost, grchan.Index)

bot.Handle(tele.OnUserJoined, grchan.OnUserJoined)
bot.Handle(tele.OnAddedToGroup, grchan.OnAdded)

Expand Down

0 comments on commit 638f437

Please sign in to comment.