Closed ghost closed 2 years ago
Hey, guys. can someone explain how to use the IsMessageToMe method correctly? I tried everything.
bot.IsMessageToMe(tgbotapi.Message{})
or
bot.IsMessageToMe(*update.Message)
I will be glad to help. I know it's a stupid question, but I've been sitting with him for days.
@greenhell1337bot.IsMessageToMe(*update.Message) is how you should do it. However, note that this method returns true only if the sent message contains @<your_bot_username> in the message text
true
@<your_bot_username>
Hey, guys. can someone explain how to use the IsMessageToMe method correctly? I tried everything.
bot.IsMessageToMe(tgbotapi.Message{})
or
bot.IsMessageToMe(*update.Message)
I will be glad to help. I know it's a stupid question, but I've been sitting with him for days.