2015-07-06 13:46:19 +00:00
|
|
|
|
package telebot
|
|
|
|
|
|
2015-09-15 12:24:34 +00:00
|
|
|
|
// ParseMode determines the way client applications treat the text of the message
|
2015-09-14 03:15:16 +00:00
|
|
|
|
type ParseMode string
|
|
|
|
|
|
|
|
|
|
// Supported ParseMode
|
|
|
|
|
const (
|
2015-10-13 14:33:14 +00:00
|
|
|
|
ModeDefault ParseMode = ""
|
2015-09-14 03:15:16 +00:00
|
|
|
|
ModeMarkdown ParseMode = "Markdown"
|
2016-01-22 11:38:45 +00:00
|
|
|
|
ModeHTML ParseMode = "HTML"
|
2015-09-14 03:15:16 +00:00
|
|
|
|
)
|
|
|
|
|
|
2015-07-06 13:46:19 +00:00
|
|
|
|
// SendOptions represents a set of custom options that could
|
|
|
|
|
// be appled to messages sent.
|
|
|
|
|
type SendOptions struct {
|
|
|
|
|
// If the message is a reply, original message.
|
|
|
|
|
ReplyTo Message
|
|
|
|
|
|
2015-07-31 07:56:02 +00:00
|
|
|
|
// See ReplyMarkup struct definition.
|
|
|
|
|
ReplyMarkup ReplyMarkup
|
2015-07-06 13:46:19 +00:00
|
|
|
|
|
|
|
|
|
// For text messages, disables previews for links in this message.
|
|
|
|
|
DisableWebPagePreview bool
|
2015-09-14 03:15:16 +00:00
|
|
|
|
|
2016-03-12 21:26:43 +00:00
|
|
|
|
// Sends the message silently. iOS users will not receive a notification, Android users will receive a notification with no sound.
|
|
|
|
|
DisableNotification bool
|
|
|
|
|
|
2015-09-14 03:15:16 +00:00
|
|
|
|
// ParseMode controls how client apps render your message.
|
|
|
|
|
ParseMode ParseMode
|
2015-07-06 13:46:19 +00:00
|
|
|
|
}
|
|
|
|
|
|
2016-01-22 11:38:45 +00:00
|
|
|
|
// ReplyMarkup specifies convenient options for bot-user communications.
|
2015-07-31 07:56:02 +00:00
|
|
|
|
type ReplyMarkup struct {
|
|
|
|
|
// ForceReply forces Telegram clients to display
|
|
|
|
|
// a reply interface to the user (act as if the user
|
|
|
|
|
// has selected the bot‘s message and tapped "Reply").
|
|
|
|
|
ForceReply bool `json:"force_reply,omitempty"`
|
|
|
|
|
|
|
|
|
|
// CustomKeyboard is Array of button rows, each represented by an Array of Strings.
|
|
|
|
|
//
|
|
|
|
|
// Note: you don't need to set HideCustomKeyboard field to show custom keyboard.
|
|
|
|
|
CustomKeyboard [][]string `json:"keyboard,omitempty"`
|
2016-04-21 20:31:30 +00:00
|
|
|
|
|
|
|
|
|
InlineKeyboard [][]KeyboardButton `json:"inline_keyboard,omitempty"`
|
|
|
|
|
|
2015-07-31 07:56:02 +00:00
|
|
|
|
// Requests clients to resize the keyboard vertically for optimal fit
|
|
|
|
|
// (e.g., make the keyboard smaller if there are just two rows of buttons).
|
|
|
|
|
// Defaults to false, in which case the custom keyboard is always of the
|
|
|
|
|
// same height as the app's standard keyboard.
|
2015-10-13 14:33:14 +00:00
|
|
|
|
ResizeKeyboard bool `json:"resize_keyboard,omitempty"`
|
2015-07-31 07:56:02 +00:00
|
|
|
|
// Requests clients to hide the keyboard as soon as it's been used. Defaults to false.
|
|
|
|
|
OneTimeKeyboard bool `json:"one_time_keyboard,omitempty"`
|
|
|
|
|
|
|
|
|
|
// Requests clients to hide the custom keyboard.
|
|
|
|
|
//
|
|
|
|
|
// Note: You dont need to set CustomKeyboard field to hide custom keyboard.
|
|
|
|
|
HideCustomKeyboard bool `json:"hide_keyboard,omitempty"`
|
|
|
|
|
|
2015-07-06 13:46:19 +00:00
|
|
|
|
// Use this param if you want to force reply from
|
|
|
|
|
// specific users only.
|
|
|
|
|
//
|
|
|
|
|
// Targets:
|
|
|
|
|
// 1) Users that are @mentioned in the text of the Message object;
|
|
|
|
|
// 2) If the bot's message is a reply (has SendOptions.ReplyTo),
|
|
|
|
|
// sender of the original message.
|
2015-07-31 07:56:02 +00:00
|
|
|
|
Selective bool `json:"selective,omitempty"`
|
2015-07-06 13:46:19 +00:00
|
|
|
|
}
|