try to fix some issues

This commit is contained in:
13xforever 2019-11-16 20:00:32 +05:00
parent d5d251e6c2
commit 252d2b47f6
3 changed files with 5 additions and 2 deletions

View File

@ -31,7 +31,7 @@ namespace CompatBot.EventHandlers
public static async Task OnMessageCreated(MessageCreateEventArgs args)
{
if (DefaultHandlerFilter.IsFluff(args.Message))
if (DefaultHandlerFilter.IsFluff(args?.Message))
return;
#if !DEBUG

View File

@ -25,7 +25,7 @@ namespace CompatBot.EventHandlers
public static async Task OnMessageCreated(MessageCreateEventArgs args)
{
if (DefaultHandlerFilter.IsFluff(args.Message))
if (DefaultHandlerFilter.IsFluff(args?.Message))
return;
#if !DEBUG

View File

@ -7,6 +7,9 @@ namespace CompatBot.Utils
{
internal static bool IsFluff(DiscordMessage message)
{
if (message == null)
return true;
if (message.Author.IsBotSafeCheck())
return true;