FlorianDahn 703c99eb8d - added a custom exception for maximum length messages, saves to time to sent to API
- added a constants file, for have constants to work with
- catching maximum message length
2019-09-17 16:43:02 +02:00

18 lines
465 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TelegramBotBase.Exceptions
{
public class MaxLengthException : Exception
{
public MaxLengthException(int length) : base($"Your messages with a length of {length} is too long for telegram. Actually is {Constants.Telegram.MaxMessageLength} characters allowed. Please split it.")
{
}
}
}