techlift-tech / TelegramBotForPokerAnalysis

0 stars 0 forks source link

Faulty logic. you are iterating over all the commands and registering botcommand multiple times #25

Open palashjhabak opened 3 years ago

palashjhabak commented 3 years ago

https://github.com/techlift-tech/TelegramBotForPokerAnalysis/blob/a13c4623d3274f270cf599106c502dbc8829615c/TechliftTelegramBot/Services/BotCommandCheckService.cs#L49

your logic should check if there is non added command and call SetMyCommandsAsync just once at the end. Calling SetMyCommandsAsync multiple times doesent make sense