Skip to content

Commit e4f891b

Browse files
opmegademget
authored andcommitted
Use recipient instead of Chat
1 parent af31945 commit e4f891b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

bot.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,7 @@ func (b *Bot) StopPoll(msg Editable, opts ...interface{}) (*Poll, error) {
943943
}
944944

945945
// Leave makes bot leave a group, supergroup or channel.
946-
func (b *Bot) Leave(chat *Chat) error {
946+
func (b *Bot) Leave(chat Recipient) error {
947947
params := map[string]string{
948948
"chat_id": chat.Recipient(),
949949
}
@@ -973,7 +973,7 @@ func (b *Bot) Pin(msg Editable, opts ...interface{}) error {
973973

974974
// Unpin unpins a message in a supergroup or a channel.
975975
// It supports tb.Silent option.
976-
func (b *Bot) Unpin(chat *Chat, messageID ...int) error {
976+
func (b *Bot) Unpin(chat Recipient, messageID ...int) error {
977977
params := map[string]string{
978978
"chat_id": chat.Recipient(),
979979
}
@@ -987,7 +987,7 @@ func (b *Bot) Unpin(chat *Chat, messageID ...int) error {
987987

988988
// UnpinAll unpins all messages in a supergroup or a channel.
989989
// It supports tb.Silent option.
990-
func (b *Bot) UnpinAll(chat *Chat) error {
990+
func (b *Bot) UnpinAll(chat Recipient) error {
991991
params := map[string]string{
992992
"chat_id": chat.Recipient(),
993993
}

0 commit comments

Comments
 (0)