17 lines
485 B
C#
17 lines
485 B
C#
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);
|
|
}
|
|
} |