Add ReplyKeyboard and ForceReply
This commit is contained in:
parent
d7698a3c50
commit
651f25be88
2 changed files with 29 additions and 1 deletions
27
api.go
27
api.go
|
@ -180,8 +180,33 @@ type APIInlineQueryResultPhoto struct {
|
|||
//TODO inputMessageContent
|
||||
}
|
||||
|
||||
type APIReplyKeyboardMarkup struct {
|
||||
Keyboard [][]APIKeyboardButton `json:"keyboard"` // Grid of buttons
|
||||
Resize bool `json:"resize_keyboard,omitempty"`
|
||||
OneTime bool `json:"one_time_keyboard,omitempty"`
|
||||
Selective bool `json:"selective,omitempty"`
|
||||
}
|
||||
|
||||
// APIForceReply forces the reply textbox to open after receiving a message
|
||||
type APIForceReply struct {
|
||||
ForceReply bool `json:"force_reply"`
|
||||
Selective bool `json:"selective,omitempty"`
|
||||
}
|
||||
|
||||
// APIKeyboardButton is a custom keyboard button
|
||||
type APIKeyboardButton struct {
|
||||
Text string `json:"text"`
|
||||
RequestContact bool `json:"request_contact,omitempty"`
|
||||
RequestLocation bool `json:"request_location,omitempty"`
|
||||
}
|
||||
|
||||
type APIReplyKeyboardRemove struct {
|
||||
RemoveKeyboard bool `json:"remove_keyboard"`
|
||||
Selective bool `json:"selective,omitempty"`
|
||||
}
|
||||
|
||||
type APIInlineKeyboardMarkup struct {
|
||||
InlineKeyboard interface{} `json:"inline_keyboard"`
|
||||
InlineKeyboard [][]APIInlineKeyboardButton `json:"inline_keyboard"`
|
||||
}
|
||||
|
||||
// APIInlineKeyboardButton is an inline message button
|
||||
|
|
3
go.mod
Normal file
3
go.mod
Normal file
|
@ -0,0 +1,3 @@
|
|||
module git.fromouter.space/hamcha/tg
|
||||
|
||||
go 1.12
|
Loading…
Reference in a new issue