- 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
This commit is contained in:
FlorianDahn
2019-09-17 16:43:02 +02:00
parent ae0fa3b0e3
commit 703c99eb8d
3 changed files with 68 additions and 8 deletions
+17
View File
@@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TelegramBotBase.Constants
{
public static class Telegram
{
/// <summary>
/// The maximum length of message text before the API throws an exception. (We will catch it before)
/// </summary>
public const int MaxMessageLength = 4096;
}
}