|
|
@ -18,6 +18,7 @@ func NewMessage(chatID int64, text string) MessageConfig { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// NewDeleteMessage creates a request to delete a message.
|
|
|
|
func NewDeleteMessage(chatID int64, messageID int) DeleteMessageConfig { |
|
|
|
func NewDeleteMessage(chatID int64, messageID int) DeleteMessageConfig { |
|
|
|
return DeleteMessageConfig{ |
|
|
|
return DeleteMessageConfig{ |
|
|
|
ChatID: chatID, |
|
|
|
ChatID: chatID, |
|
|
@ -289,6 +290,33 @@ func NewVoiceShare(chatID int64, fileID string) VoiceConfig { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// NewMediaGroup creates a new media group. Files should be an array of
|
|
|
|
|
|
|
|
// two to ten InputMediaPhoto or InputMediaVideo.
|
|
|
|
|
|
|
|
func NewMediaGroup(chatID int64, files []interface{}) MediaGroupConfig { |
|
|
|
|
|
|
|
return MediaGroupConfig{ |
|
|
|
|
|
|
|
BaseChat: BaseChat{ |
|
|
|
|
|
|
|
ChatID: chatID, |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
InputMedia: files, |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// NewInputMediaPhoto creates a new InputMediaPhoto.
|
|
|
|
|
|
|
|
func NewInputMediaPhoto(media string) InputMediaPhoto { |
|
|
|
|
|
|
|
return InputMediaPhoto{ |
|
|
|
|
|
|
|
Type: "photo", |
|
|
|
|
|
|
|
Media: media, |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// NewInputMediaVideo creates a new InputMediaVideo.
|
|
|
|
|
|
|
|
func NewInputMediaVideo(media string) InputMediaVideo { |
|
|
|
|
|
|
|
return InputMediaVideo{ |
|
|
|
|
|
|
|
Type: "video", |
|
|
|
|
|
|
|
Media: media, |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// NewContact allows you to send a shared contact.
|
|
|
|
// NewContact allows you to send a shared contact.
|
|
|
|
func NewContact(chatID int64, phoneNumber, firstName string) ContactConfig { |
|
|
|
func NewContact(chatID int64, phoneNumber, firstName string) ContactConfig { |
|
|
|
return ContactConfig{ |
|
|
|
return ContactConfig{ |
|
|
|