pull/62/merge
Hamed Ghasemzadeh 9 years ago committed by GitHub
commit 845588545d
  1. 5
      configs.go
  2. 10
      telegram-bot-api.iml
  3. 10
      types.go

@ -349,6 +349,7 @@ func (config AudioConfig) method() string {
// DocumentConfig contains information about a SendDocument request. // DocumentConfig contains information about a SendDocument request.
type DocumentConfig struct { type DocumentConfig struct {
BaseFile BaseFile
Caption string
} }
// values returns a url.Values representation of DocumentConfig. // values returns a url.Values representation of DocumentConfig.
@ -360,6 +361,10 @@ func (config DocumentConfig) values() (url.Values, error) {
v.Add(config.name(), config.FileID) v.Add(config.name(), config.FileID)
if config.Caption != "" {
v.Add("caption", config.Caption)
}
return v, nil return v, nil
} }

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="GO_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="GOPATH &lt;telegram-bot-api&gt;" level="project" />
</component>
</module>

@ -358,9 +358,9 @@ type InlineKeyboardButton struct {
Text string `json:"text"` Text string `json:"text"`
URL *string `json:"url,omitempty"` // optional URL *string `json:"url,omitempty"` // optional
CallbackData *string `json:"callback_data,omitempty"` // optional CallbackData *string `json:"callback_data,omitempty"` // optional
SwitchInlineQuery *string `json:"switch_inline_query,omitempty"` // optional SwitchInlineQuery *string `json:"switch_inline_query,omitempty,omitempty"` // optional
SwitchInlineQueryCurrentChat *string `json:"switch_inline_query_current_chat"` // optional SwitchInlineQueryCurrentChat *string `json:"switch_inline_query_current_chat,omitempty"` // optional
CallbackGame *CallbackGame `json:"callback_game"` // optional CallbackGame *CallbackGame `json:"callback_game,omitempty"` // optional
} }
// CallbackQuery is data sent when a keyboard button with callback data // CallbackQuery is data sent when a keyboard button with callback data
@ -607,8 +607,8 @@ type ChosenInlineResult struct {
// as an inline query result. // as an inline query result.
type InputTextMessageContent struct { type InputTextMessageContent struct {
Text string `json:"message_text"` Text string `json:"message_text"`
ParseMode string `json:"parse_mode"` ParseMode string `json:"parse_mode,omitempty"`
DisableWebPagePreview bool `json:"disable_web_page_preview"` DisableWebPagePreview bool `json:"disable_web_page_preview,omitempty"`
} }
// InputLocationMessageContent contains a location for displaying // InputLocationMessageContent contains a location for displaying