Skip to content

Commit

Permalink
poller: add allowed_updates list
Browse files Browse the repository at this point in the history
  • Loading branch information
nentenpizza authored and demget committed Mar 5, 2024
1 parent 0d0d5e7 commit cb88a11
Showing 1 changed file with 21 additions and 2 deletions.
23 changes: 21 additions & 2 deletions poller.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,32 @@ package telebot

import "time"

var AllowedUpdates = []string{
"message",
"edited_message",
"channel_post",
"edited_channel_post",
"message_reaction",
"message_reaction_count",
"inline_query",
"chosen_inline_result",
"callback_query",
"shipping_query",
"pre_checkout_query",
"poll",
"poll_answer",
"my_chat_member",
"chat_member",
"chat_join_request",
"chat_boost",
"removed_chat_boost",
}

// Poller is a provider of Updates.
//
// All pollers must implement Poll(), which accepts bot
// pointer and subscription channel and start polling
// synchronously straight away.
//
type Poller interface {
// Poll is supposed to take the bot object
// subscription channel and start polling
Expand Down Expand Up @@ -70,7 +90,6 @@ func (p *LongPoller) Poll(b *Bot, dest chan Update, stop chan struct{}) {
// handling, banning or whatever.
//
// For heavy middleware, use increased capacity.
//
type MiddlewarePoller struct {
Capacity int // Default: 1
Poller Poller
Expand Down

0 comments on commit cb88a11

Please sign in to comment.