fix potential issue in the event handler

This commit is contained in:
13xforever 2019-12-01 14:57:41 +05:00
parent 01b46aff91
commit 5134fc6dd7

View File

@ -29,7 +29,7 @@ namespace CompatBot.EventHandlers
return;
#if !DEBUG
if (!args.Channel.Name.Equals("help", StringComparison.InvariantCultureIgnoreCase))
if (!"help".Equals(args?.Channel?.Name, StringComparison.InvariantCultureIgnoreCase))
return;
if (DateTime.UtcNow - lastMention < ThrottlingThreshold)