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