File tree Expand file tree Collapse file tree
Sources/TelegramBot/Builders Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ) ;
Original file line number Diff line number Diff 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 {
You can’t perform that action at this time.
0 commit comments