Skip to content

Commit aa6154c

Browse files
committed
chore: Update Telegram bot token configuration key
1 parent 987081e commit aa6154c

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

Sources/TelegramBot/Builders/BotBuilder.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ public BotBuilder UseApiKey(Action<TelegramApiKeyBuilder> value)
9393
}
9494
if (builder.UseConfiguration)
9595
{
96-
_token = Configuration["TelegramApiKey"]
97-
?? throw new ArgumentNullException("TelegramApiKey", "The Telegram bot token is not set in the configuration.");
96+
_token = Configuration["TelegramBotToken"]
97+
?? throw new ArgumentNullException("TelegramBotToken", "The Telegram bot token is not set in the configuration.");
9898
}
9999
return this;
100100
}
@@ -107,7 +107,7 @@ public IBot Build()
107107
{
108108
if (string.IsNullOrWhiteSpace(_token))
109109
{
110-
throw new ArgumentNullException("TelegramApiKey", "The Telegram bot token is not set.");
110+
throw new ArgumentNullException("TelegramBotToken", "The Telegram bot token is not set.");
111111
}
112112
TelegramBotClientOptions options = new TelegramBotClientOptions(_token, _baseApiUrl);
113113
TelegramBotClient client = new TelegramBotClient(options);

Sources/TelegramBot/Builders/TelegramApiKeyBuilder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public class TelegramApiKeyBuilder
1313
internal bool UseConfiguration { get; private set; }
1414

1515
/// <summary>
16-
/// Use the configuration value 'TelegramApiKey' as the API key.
16+
/// Use the configuration value 'TelegramBotToken' as the API key.
1717
/// </summary>
1818
public void FromConfiguration()
1919
{

0 commit comments

Comments
 (0)