This commit is contained in:
Kwoth 2017-01-04 22:45:36 +01:00
parent 3bcd4c2374
commit 8d26471748

View File

@ -65,7 +65,7 @@ namespace NadekoBot
client.ChannelUpdated += (arg1, arg2) => { ChannelUpdated(arg1, arg2); return Task.CompletedTask; };
_log.Info($"Shard #{i} initialized.");
client.Log += Client_Log;
var j = i;
client.Disconnected += (ex) =>
{
@ -78,6 +78,12 @@ namespace NadekoBot
Clients = clientList.AsReadOnly();
}
private Task Client_Log(LogMessage arg)
{
_log.Warn(arg.Exception, arg.Message);
return Task.CompletedTask;
}
public DiscordSocketClient MainClient =>
Clients[0];