diff --git a/src/NadekoBot/Modules/Administration/Administration.cs b/src/NadekoBot/Modules/Administration/Administration.cs index 37defcd8..26491d0c 100644 --- a/src/NadekoBot/Modules/Administration/Administration.cs +++ b/src/NadekoBot/Modules/Administration/Administration.cs @@ -70,7 +70,7 @@ namespace NadekoBot.Modules.Administration catch (Exception ex) { await ReplyErrorLocalized("setrole_err").ConfigureAwait(false); - Console.WriteLine(ex.ToString()); + _log.Info(ex); } } diff --git a/src/NadekoBot/Modules/Administration/Commands/SelfAssignedRolesCommand.cs b/src/NadekoBot/Modules/Administration/Commands/SelfAssignedRolesCommand.cs index 6ac3c41f..9815fa1b 100644 --- a/src/NadekoBot/Modules/Administration/Commands/SelfAssignedRolesCommand.cs +++ b/src/NadekoBot/Modules/Administration/Commands/SelfAssignedRolesCommand.cs @@ -216,7 +216,7 @@ namespace NadekoBot.Modules.Administration catch (Exception ex) { await ReplyErrorLocalized("self_assign_perms").ConfigureAwait(false); - Console.WriteLine(ex); + _log.Info(ex); return; } var msg = await ReplyConfirmLocalized("self_assign_success",Format.Bold(role.Name)).ConfigureAwait(false); diff --git a/src/NadekoBot/Modules/Games/Commands/Hangman/HangmanGame.cs b/src/NadekoBot/Modules/Games/Commands/Hangman/HangmanGame.cs index 4793ea9b..376fe584 100644 --- a/src/NadekoBot/Modules/Games/Commands/Hangman/HangmanGame.cs +++ b/src/NadekoBot/Modules/Games/Commands/Hangman/HangmanGame.cs @@ -25,7 +25,7 @@ namespace NadekoBot.Modules.Games.Hangman } catch (Exception ex) { - Console.WriteLine(ex); + } } diff --git a/src/NadekoBot/Modules/Searches/Commands/LoLCommands.cs b/src/NadekoBot/Modules/Searches/Commands/LoLCommands.cs index 589eecaf..d7697a5c 100644 --- a/src/NadekoBot/Modules/Searches/Commands/LoLCommands.cs +++ b/src/NadekoBot/Modules/Searches/Commands/LoLCommands.cs @@ -173,7 +173,7 @@ namespace NadekoBot.Modules.Searches // .FirstOrDefault(jt => jt["role"].ToString() == role)?["general"]; // if (general == null) // { -// Console.WriteLine("General is null."); +// //Console.WriteLine("General is null."); // return; // } // //get build data for this role @@ -309,7 +309,7 @@ namespace NadekoBot.Modules.Searches // } // catch (Exception ex) // { -// Console.WriteLine(ex); +// //Console.WriteLine(ex); // await channel.SendMessageAsync("💢 Failed retreiving data for that champion.").ConfigureAwait(false); // } // }); diff --git a/src/NadekoBot/Modules/Searches/Commands/OverwatchCommands.cs b/src/NadekoBot/Modules/Searches/Commands/OverwatchCommands.cs index 75c880b0..98b7b583 100644 --- a/src/NadekoBot/Modules/Searches/Commands/OverwatchCommands.cs +++ b/src/NadekoBot/Modules/Searches/Commands/OverwatchCommands.cs @@ -86,7 +86,6 @@ namespace NadekoBot.Modules.Searches { http.AddFakeHeaders(); var url = $"https://owapi.nadekobot.me/api/v3/u/{battletag}/stats"; - System.Console.WriteLine(url); var res = await http.GetStringAsync($"https://owapi.nadekobot.me/api/v3/u/{battletag}/stats"); var model = JsonConvert.DeserializeObject(res); switch (region) diff --git a/src/NadekoBot/NadekoBot.cs b/src/NadekoBot/NadekoBot.cs index 03617535..6bc2a657 100644 --- a/src/NadekoBot/NadekoBot.cs +++ b/src/NadekoBot/NadekoBot.cs @@ -331,23 +331,16 @@ namespace NadekoBot private static void SetupLogger() { - try + var logConfig = new LoggingConfiguration(); + var consoleTarget = new ColoredConsoleTarget() { - var logConfig = new LoggingConfiguration(); - var consoleTarget = new ColoredConsoleTarget() - { - Layout = @"${date:format=HH\:mm\:ss} ${logger} | ${message}" - }; - logConfig.AddTarget("Console", consoleTarget); + Layout = @"${date:format=HH\:mm\:ss} ${logger} | ${message}" + }; + logConfig.AddTarget("Console", consoleTarget); - logConfig.LoggingRules.Add(new LoggingRule("*", LogLevel.Debug, consoleTarget)); + logConfig.LoggingRules.Add(new LoggingRule("*", LogLevel.Debug, consoleTarget)); - LogManager.Configuration = logConfig; - } - catch (Exception ex) - { - Console.WriteLine(ex); - } + LogManager.Configuration = logConfig; } } } diff --git a/src/NadekoBot/Services/ClashOfClans/ClashOfClansService.cs b/src/NadekoBot/Services/ClashOfClans/ClashOfClansService.cs index 89a6c670..edb78512 100644 --- a/src/NadekoBot/Services/ClashOfClans/ClashOfClansService.cs +++ b/src/NadekoBot/Services/ClashOfClans/ClashOfClansService.cs @@ -128,7 +128,6 @@ namespace NadekoBot.Services.ClashOfClans SequenceNumber = i, }); } - Console.WriteLine(cw.Bases.Capacity); uow.ClashOfClans.Add(cw); await uow.CompleteAsync(); return cw; diff --git a/src/NadekoBot/Services/Games/ChatterBotSession.cs b/src/NadekoBot/Services/Games/ChatterBotSession.cs index 8d5e83a7..920ea709 100644 --- a/src/NadekoBot/Services/Games/ChatterBotSession.cs +++ b/src/NadekoBot/Services/Games/ChatterBotSession.cs @@ -30,7 +30,6 @@ namespace NadekoBot.Services.Games { var res = await http.GetStringAsync(string.Format(apiEndpoint, message)).ConfigureAwait(false); var cbr = JsonConvert.DeserializeObject(res); - //Console.WriteLine(cbr.Convo_id); return cbr.BotSay.Replace("
", "\n"); } } diff --git a/src/NadekoBot/Services/Impl/BotCredentials.cs b/src/NadekoBot/Services/Impl/BotCredentials.cs index 49eb56ec..828ed573 100644 --- a/src/NadekoBot/Services/Impl/BotCredentials.cs +++ b/src/NadekoBot/Services/Impl/BotCredentials.cs @@ -81,7 +81,11 @@ namespace NadekoBot.Services.Impl ulong.TryParse(data[nameof(ClientId)], out clId); ClientId = clId; - SoundCloudClientId = data[nameof(SoundCloudClientId)]; + var scId = data[nameof(SoundCloudClientId)]; + SoundCloudClientId = scId; + //SoundCloudClientId = string.IsNullOrWhiteSpace(scId) + // ? + // : scId; CarbonKey = data[nameof(CarbonKey)]; var dbSection = data.GetSection("db"); Db = new DBConfig(string.IsNullOrWhiteSpace(dbSection["Type"]) diff --git a/src/NadekoBot/Services/Music/SoundCloudApiService.cs b/src/NadekoBot/Services/Music/SoundCloudApiService.cs index 34240970..22a3ccda 100644 --- a/src/NadekoBot/Services/Music/SoundCloudApiService.cs +++ b/src/NadekoBot/Services/Music/SoundCloudApiService.cs @@ -27,7 +27,6 @@ namespace NadekoBot.Services.Music using (var http = new HttpClient()) { response = await http.GetStringAsync($"http://api.soundcloud.com/resolve?url={url}&client_id={_creds.SoundCloudClientId}").ConfigureAwait(false); - } diff --git a/src/NadekoBot/Services/Utility/MessageRepeaterService.cs b/src/NadekoBot/Services/Utility/MessageRepeaterService.cs index 9966969b..57873ef1 100644 --- a/src/NadekoBot/Services/Utility/MessageRepeaterService.cs +++ b/src/NadekoBot/Services/Utility/MessageRepeaterService.cs @@ -17,7 +17,6 @@ namespace NadekoBot.Services.Utility public MessageRepeaterService(NadekoBot bot, DiscordShardedClient client, IEnumerable gcs) { - System.Console.WriteLine(bot.Ready); var _ = Task.Run(async () => { while (!bot.Ready) diff --git a/src/NadekoBot/_Extensions/Extensions.cs b/src/NadekoBot/_Extensions/Extensions.cs index 362a1184..050903a2 100644 --- a/src/NadekoBot/_Extensions/Extensions.cs +++ b/src/NadekoBot/_Extensions/Extensions.cs @@ -94,7 +94,7 @@ namespace NadekoBot.Extensions } } } - catch (Exception ex) { Console.WriteLine(ex); } + catch (Exception ex) { } }; using (msg.OnReaction(client, changePage, changePage))