diff --git a/JetHerald/JetHeraldBot.cs b/JetHerald/JetHeraldBot.cs index 25da66f..dfa4411 100644 --- a/JetHerald/JetHeraldBot.cs +++ b/JetHerald/JetHeraldBot.cs @@ -31,15 +31,15 @@ namespace JetHerald public async Task Init() { if (Config.UseProxy) - { - Client = new TelegramBotClient(Config.ApiKey); - } - else { var httpProxy = new WebProxy(Config.ProxyUrl) { Credentials = new NetworkCredential(Config.ProxyLogin, Config.ProxyPassword) }; Client = new TelegramBotClient(Config.ApiKey, httpProxy); } + else + { + Client = new TelegramBotClient(Config.ApiKey); + } Me = await Client.GetMeAsync(); Commands = new ChatCommandRouter(Me.Username, Log);