WIP: implemented registration and EULA accept, WIP on auth issue
This commit is contained in:
17
JOBot.TClient/Infrastructure/Exceptions/FallbackException.cs
Normal file
17
JOBot.TClient/Infrastructure/Exceptions/FallbackException.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using Telegram.Bot;
|
||||
using Telegram.Bot.Types;
|
||||
|
||||
namespace JOBot.TClient.Infrastructure.Exceptions;
|
||||
|
||||
/// <summary>
|
||||
/// Exception for fallback
|
||||
/// WARNING: Don't create new exception without throwing it
|
||||
/// </summary>
|
||||
public class FallbackException : Exception
|
||||
{
|
||||
public FallbackException(string message, Message botMessage, ITelegramBotClient botClient) : base(message)
|
||||
{
|
||||
botClient.SendMessage(chatId: botMessage.Chat.Id,
|
||||
TextResource.FallbackMessage);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user