Skip to content

Commit

Permalink
use Self method insted of GetMe
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelemusiani committed Jan 3, 2024
1 parent 13bf410 commit ff1d6b4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions bot/bot.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,7 @@ func handleCommand(bot *tgbotapi.BotAPI, update *tgbotapi.Update) {
forName := commandWithAt[atIndex+1:]
log.Println(forName)

me, err := bot.GetMe()
if me.UserName != forName && err == nil {
if bot.Self.UserName != forName {
return
}
}
Expand Down

0 comments on commit ff1d6b4

Please sign in to comment.