Fixed PM crash when modules are enabled

This commit is contained in:
RogueException
2015-12-23 05:05:26 -04:00
parent 84bf9e7514
commit e3b5cf3a71

View File

@@ -75,7 +75,7 @@ namespace Discord.Modules
if (_allowAll || _useServerWhitelist) //Server-only events
{
client.ChannelCreated += (s, e) => { if (HasServer(e.Server)) ChannelCreated(s, e); };
client.ChannelCreated += (s, e) => { if (e.Server != null && HasServer(e.Server)) ChannelCreated(s, e); };
client.UserVoiceStateUpdated += (s, e) => { if (HasServer(e.Server)) UserVoiceStateUpdated(s, e); };
}