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

Create an allowed_updates list #153

Merged
merged 1 commit into from
Jan 31, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions models/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,30 @@ type Update struct {
ChatBoost *ChatBoostUpdated `json:"chat_boost,omitempty"`
RemovedChatBoost *ChatBoostRemoved `json:"removed_chat_boost,omitempty"`
}

// allowed_updates https://core.telegram.org/bots/api#update
const (
AllowedUpdateMessage string = "message"
AllowedUpdateEditedMessage string = "edited_message"
AllowedUpdateChannelPost string = "channel_post"
AllowedUpdateEditedChannelPost string = "edited_channel_post"
AllowedUpdateBusinessConnection string = "business_connection"
AllowedUpdateBusinessMessage string = "business_message"
AllowedUpdateEditedBusinessMessage string = "edited_business_message"
AllowedUpdateDeletedBusinessMessages string = "deleted_business_messages"
AllowedUpdateMessageReaction string = "message_reaction"
AllowedUpdateMessageReactionCount string = "message_reaction_count"
AllowedUpdateInlineQuery string = "inline_query"
AllowedUpdateChosenInlineResult string = "chosen_inline_result"
AllowedUpdateCallbackQuery string = "callback_query"
AllowedUpdateShippingQuery string = "shipping_query"
AllowedUpdatePreCheckoutQuery string = "pre_checkout_query"
AllowedUpdatePurchasedPaidMedia string = "purchased_paid_media"
AllowedUpdatePoll string = "poll"
AllowedUpdatePollAnswer string = "poll_answer"
AllowedUpdateMyChatMember string = "my_chat_member"
AllowedUpdateChatMember string = "chat_member"
AllowedUpdateChatJoinRequest string = "chat_join_request"
AllowedUpdateChatBoost string = "chat_boost"
AllowedUpdateRemovedChatBoost string = "removed_chat_boost"
)
Loading