Skip to content

Commit 2349a28

Browse files
committed
logged better
1 parent 1536e17 commit 2349a28

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

KekBot/KekBot.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,12 @@ public KekBot(Config config, int shardID) {
105105
LogLevel = LogLevel.Debug
106106
});
107107

108+
Discord.DebugLogger.LogMessageReceived += DebugLogger_LogMessageReceived;
109+
Discord.GuildAvailable += GuildAvailable;
110+
Discord.Ready += Ready;
111+
Discord.ClientErrored += DiscordErrored;
112+
Discord.SocketErrored += SocketErrored;
113+
108114
Services = new ServiceCollection()
109115
.AddSingleton(CommandInfos)
110116
.AddSingleton(FakeCommands)
@@ -139,9 +145,9 @@ public KekBot(Config config, int shardID) {
139145

140146
// TODO: I just realized this would print for every shard. Move this somewhere else?
141147
if (config.WeebToken == null) {
142-
Console.WriteLine("NOT registering weeb commands because no token was found >:(");
148+
Discord.DebugLogger.LogMessage(LogLevel.Info, LOGTAG, "NOT registering weeb commands because no token was found >:(", DateTime.Now);
143149
} else {
144-
Console.WriteLine("Initializing weeb commands");
150+
Discord.DebugLogger.LogMessage(LogLevel.Info, LOGTAG, "Initializing weeb commands", DateTime.Now);
145151
CommandsNext.RegisterCommands<WeebCommands>();
146152
}
147153

@@ -161,12 +167,6 @@ public KekBot(Config config, int shardID) {
161167
}
162168
}
163169

164-
Discord.DebugLogger.LogMessageReceived += DebugLogger_LogMessageReceived;
165-
Discord.GuildAvailable += GuildAvailable;
166-
Discord.Ready += Ready;
167-
Discord.ClientErrored += DiscordErrored;
168-
Discord.SocketErrored += SocketErrored;
169-
170170
PrefixSettings = new ConcurrentDictionary<ulong, string>();
171171

172172
Interactivity = Discord.UseInteractivity(new InteractivityConfiguration());

0 commit comments

Comments
 (0)