From ff1d6b4506f328eb3856791127dec2ca800c5e69 Mon Sep 17 00:00:00 2001 From: Samuele Musiani Date: Wed, 3 Jan 2024 12:14:41 +0100 Subject: [PATCH] use Self method insted of GetMe --- bot/bot.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bot/bot.go b/bot/bot.go index 498adf5..653fa9d 100644 --- a/bot/bot.go +++ b/bot/bot.go @@ -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 } }