Skip to content

Commit

Permalink
Use recipient instead of Chat
Browse files Browse the repository at this point in the history
  • Loading branch information
opmega authored and demget committed Mar 3, 2024
1 parent af31945 commit e4f891b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bot.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
}
Expand Down Expand Up @@ -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(),
}
Expand All @@ -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(),
}
Expand Down

0 comments on commit e4f891b

Please sign in to comment.