nminaya / grammar-nazi-bot

Bot that corrects spelling mistakes.
MIT License
31 stars 8 forks source link

Application Exception: Forbidden: bot was blocked by the user #42

Closed nminaya closed 3 years ago

nminaya commented 3 years ago

This is an issue created automatically by GrammarNazi when an exception was captured.

Date (UTC): 12/4/2020 1:49:45 AM

Exception:

Telegram.Bot.Exceptions.ApiRequestException: Forbidden: bot was blocked by the user at Telegram.Bot.TelegramBotClient.MakeRequestAsync[TResponse](IRequest`1 request, CancellationToken cancellationToken) at GrammarNazi.Core.Services.TelegramCommandHandlerService.HandleCommand(Message message) in C:\Users\QIS9\Documents\GitHub\grammar-nazi-bot\GrammarNazi.Core\Services\TelegramCommandHandlerService.cs:line 74 at GrammarNazi.App.HostedServices.TelegramBotHostedService.OnMessageReceived(Object sender, MessageEventArgs messageEvent) in C:\Users\QIS9\Documents\GitHub\grammar-nazi-bot\GrammarNazi.App\HostedServices\TelegramBotHostedService.cs:line 87 at GrammarNazi.App.HostedServices.TelegramBotHostedService.b__8_0(Object obj, MessageEventArgs eventArgs) in C:\Users\QIS9\Documents\GitHub\grammar-nazi-bot\GrammarNazi.App\HostedServices\TelegramBotHostedService.cs:line 58

nminaya commented 3 years ago

Seems like we'll need to handle when a user blocks the Telegram bot. Weird... This only could happen when a user blocks the Bot right before getting a correction 🤔