Initial commit
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
namespace MemeVault.Bot.Options;
|
||||
|
||||
public sealed class BotOptions
|
||||
{
|
||||
public const string Section = "Bot";
|
||||
|
||||
public string Token { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>Polling | Webhook</summary>
|
||||
public string Mode { get; set; } = "Polling";
|
||||
|
||||
/// <summary>
|
||||
/// Переопределяет базовый URL Telegram Bot API.
|
||||
/// Полезно для локального сервера (https://github.com/tdlib/telegram-bot-api)
|
||||
/// или прокси. Если пусто — используется стандартный https://api.telegram.org.
|
||||
/// Пример: http://localhost:8081
|
||||
/// </summary>
|
||||
public string? ApiBaseUrl { get; set; }
|
||||
|
||||
/// <summary>Публичный URL хоста для регистрации webhook (только в режиме Webhook).</summary>
|
||||
public string WebhookHost { get; set; } = string.Empty;
|
||||
|
||||
public string WebhookPath => $"/webhook/{Token}";
|
||||
public string WebhookUrl => $"{WebhookHost}{WebhookPath}";
|
||||
}
|
||||
Reference in New Issue
Block a user