From e4f891ba6c1a920721b1661e08b425e28578c2db Mon Sep 17 00:00:00 2001 From: Patrick <54525079+opmega@users.noreply.github.com> Date: Sat, 12 Nov 2022 15:15:42 +0100 Subject: [PATCH] Use recipient instead of Chat --- bot.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bot.go b/bot.go index 6b4e666..29f37af 100644 --- a/bot.go +++ b/bot.go @@ -943,7 +943,7 @@ func (b *Bot) StopPoll(msg Editable, opts ...interface{}) (*Poll, error) { } // Leave makes bot leave a group, supergroup or channel. -func (b *Bot) Leave(chat *Chat) error { +func (b *Bot) Leave(chat Recipient) error { params := map[string]string{ "chat_id": chat.Recipient(), } @@ -973,7 +973,7 @@ func (b *Bot) Pin(msg Editable, opts ...interface{}) error { // Unpin unpins a message in a supergroup or a channel. // It supports tb.Silent option. -func (b *Bot) Unpin(chat *Chat, messageID ...int) error { +func (b *Bot) Unpin(chat Recipient, messageID ...int) error { params := map[string]string{ "chat_id": chat.Recipient(), } @@ -987,7 +987,7 @@ func (b *Bot) Unpin(chat *Chat, messageID ...int) error { // UnpinAll unpins all messages in a supergroup or a channel. // It supports tb.Silent option. -func (b *Bot) UnpinAll(chat *Chat) error { +func (b *Bot) UnpinAll(chat Recipient) error { params := map[string]string{ "chat_id": chat.Recipient(), }