forked from PaulSonOfLars/gotgbot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgen_consts.go
executable file
·127 lines (99 loc) · 3.65 KB
/
gen_consts.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
// THIS FILE IS AUTOGENERATED. DO NOT EDIT.
// Regen by running 'go generate' in the repo root.
package gotgbot
// The consts listed below represent all the update types that can be requested from telegram.
const (
UpdateTypeMessage = "message"
UpdateTypeEditedMessage = "edited_message"
UpdateTypeChannelPost = "channel_post"
UpdateTypeEditedChannelPost = "edited_channel_post"
UpdateTypeBusinessConnection = "business_connection"
UpdateTypeBusinessMessage = "business_message"
UpdateTypeEditedBusinessMessage = "edited_business_message"
UpdateTypeDeletedBusinessMessages = "deleted_business_messages"
UpdateTypeMessageReaction = "message_reaction"
UpdateTypeMessageReactionCount = "message_reaction_count"
UpdateTypeInlineQuery = "inline_query"
UpdateTypeChosenInlineResult = "chosen_inline_result"
UpdateTypeCallbackQuery = "callback_query"
UpdateTypeShippingQuery = "shipping_query"
UpdateTypePreCheckoutQuery = "pre_checkout_query"
UpdateTypePoll = "poll"
UpdateTypePollAnswer = "poll_answer"
UpdateTypeMyChatMember = "my_chat_member"
UpdateTypeChatMember = "chat_member"
UpdateTypeChatJoinRequest = "chat_join_request"
UpdateTypeChatBoost = "chat_boost"
UpdateTypeRemovedChatBoost = "removed_chat_boost"
)
// GetType is a helper method to easily identify the type of update that is being received.
func (u Update) GetType() string {
switch {
case u.Message != nil:
return UpdateTypeMessage
case u.EditedMessage != nil:
return UpdateTypeEditedMessage
case u.ChannelPost != nil:
return UpdateTypeChannelPost
case u.EditedChannelPost != nil:
return UpdateTypeEditedChannelPost
case u.BusinessConnection != nil:
return UpdateTypeBusinessConnection
case u.BusinessMessage != nil:
return UpdateTypeBusinessMessage
case u.EditedBusinessMessage != nil:
return UpdateTypeEditedBusinessMessage
case u.DeletedBusinessMessages != nil:
return UpdateTypeDeletedBusinessMessages
case u.MessageReaction != nil:
return UpdateTypeMessageReaction
case u.MessageReactionCount != nil:
return UpdateTypeMessageReactionCount
case u.InlineQuery != nil:
return UpdateTypeInlineQuery
case u.ChosenInlineResult != nil:
return UpdateTypeChosenInlineResult
case u.CallbackQuery != nil:
return UpdateTypeCallbackQuery
case u.ShippingQuery != nil:
return UpdateTypeShippingQuery
case u.PreCheckoutQuery != nil:
return UpdateTypePreCheckoutQuery
case u.Poll != nil:
return UpdateTypePoll
case u.PollAnswer != nil:
return UpdateTypePollAnswer
case u.MyChatMember != nil:
return UpdateTypeMyChatMember
case u.ChatMember != nil:
return UpdateTypeChatMember
case u.ChatJoinRequest != nil:
return UpdateTypeChatJoinRequest
case u.ChatBoost != nil:
return UpdateTypeChatBoost
case u.RemovedChatBoost != nil:
return UpdateTypeRemovedChatBoost
default:
return "unknown"
}
}
// The consts listed below represent all the parse_mode options that can be sent to telegram.
const (
ParseModeHTML = "HTML"
ParseModeMarkdownV2 = "MarkdownV2"
ParseModeMarkdown = "Markdown"
ParseModeNone = ""
)
// The consts listed below represent all the sticker types that can be obtained from telegram.
const (
StickerTypeRegular = "regular"
StickerTypeMask = "mask"
StickerTypeCustomEmoji = "custom_emoji"
)
// The consts listed below represent all the chat types that can be obtained from telegram.
const (
ChatTypePrivate = "private"
ChatTypeGroup = "group"
ChatTypeSupergroup = "supergroup"
ChatTypeChannel = "channel"
)