Add methods for editing messages.
This commit is contained in:
parent
a92f88ce2c
commit
b6130533a3
2 changed files with 110 additions and 0 deletions
22
bot_test.go
22
bot_test.go
|
@ -340,6 +340,28 @@ func TestSendChatConfig(t *testing.T) {
|
|||
}
|
||||
}
|
||||
|
||||
func TestSendEditMessage(t *testing.T) {
|
||||
bot, _ := getBot(t)
|
||||
|
||||
msg, err := bot.Send(tgbotapi.NewMessage(ChatID, "Testing editing."))
|
||||
if err != nil {
|
||||
t.Fail()
|
||||
}
|
||||
|
||||
edit := tgbotapi.EditMessageTextConfig{
|
||||
BaseEdit: tgbotapi.BaseEdit{
|
||||
ChatID: ChatID,
|
||||
MessageID: msg.MessageID,
|
||||
},
|
||||
Text: "Updated text.",
|
||||
}
|
||||
|
||||
_, err = bot.Send(edit)
|
||||
if err != nil {
|
||||
t.Fail()
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetUserProfilePhotos(t *testing.T) {
|
||||
bot, _ := getBot(t)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue