Remove new methods that returned APIResponse.
This commit is contained in:
parent
6a6de7e674
commit
1aef8c8c45
2 changed files with 35 additions and 42 deletions
42
bot.go
42
bot.go
|
@ -572,45 +572,3 @@ func (bot *BotAPI) GetStickerSet(config GetStickerSetConfig) (StickerSet, error)
|
|||
|
||||
return stickers, err
|
||||
}
|
||||
|
||||
// SetChatTitle change title of chat.
|
||||
func (bot *BotAPI) SetChatTitle(config SetChatTitleConfig) (APIResponse, error) {
|
||||
v, err := config.values()
|
||||
if err != nil {
|
||||
return APIResponse{}, err
|
||||
}
|
||||
|
||||
return bot.MakeRequest(config.method(), v)
|
||||
}
|
||||
|
||||
// SetChatDescription change description of chat.
|
||||
func (bot *BotAPI) SetChatDescription(config SetChatDescriptionConfig) (APIResponse, error) {
|
||||
v, err := config.values()
|
||||
if err != nil {
|
||||
return APIResponse{}, err
|
||||
}
|
||||
|
||||
return bot.MakeRequest(config.method(), v)
|
||||
}
|
||||
|
||||
// SetChatPhoto change photo of chat.
|
||||
func (bot *BotAPI) SetChatPhoto(config SetChatPhotoConfig) (APIResponse, error) {
|
||||
params, err := config.params()
|
||||
if err != nil {
|
||||
return APIResponse{}, err
|
||||
}
|
||||
|
||||
file := config.getFile()
|
||||
|
||||
return bot.UploadFile(config.method(), params, config.name(), file)
|
||||
}
|
||||
|
||||
// DeleteChatPhoto delete photo of chat.
|
||||
func (bot *BotAPI) DeleteChatPhoto(config DeleteChatPhotoConfig) (APIResponse, error) {
|
||||
v, err := config.values()
|
||||
if err != nil {
|
||||
return APIResponse{}, err
|
||||
}
|
||||
|
||||
return bot.MakeRequest(config.method(), v)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue