all repos — telegram-bot-api @ 6f966b81a4d290c4daa360046e2bf5d80f1fe8c8

Golang bindings for the Telegram Bot API

Merge pull request #15 from Etherdrake/synced

Added NewDeleteMessages function
OvyFlash 46941696+OvyFlash@users.noreply.github.com
Sat, 17 Feb 2024 21:21:07 +0200
commit

6f966b81a4d290c4daa360046e2bf5d80f1fe8c8

parent

63e5c59035bfde1a7babea214eceb0e2e60e816f

1 files changed, 13 insertions(+), 0 deletions(-)

jump to
M helper_methods.gohelper_methods.go

@@ -40,6 +40,19 @@ },

} } +// NewDeleteMessages creates a request to delete multiple messages. The messages have to be +// in the same chat. Provide the message ids as an array of integers +func NewDeleteMessages(chatID int64, messageIDs []int) DeleteMessagesConfig { + return DeleteMessagesConfig{ + BaseChatMessages: BaseChatMessages{ + ChatConfig: ChatConfig{ + ChatID: chatID, + }, + MessageIDs: messageIDs, + }, + } +} + // NewMessageToChannel creates a new Message that is sent to a channel // by username. //