Skip to content

Commit

Permalink
Fix an issue with LeftGuild
Browse files Browse the repository at this point in the history
For some reason, the LeftGuild event is being triggered non-stop when the bot has not left a guild?
  • Loading branch information
byBlurr authored Feb 19, 2021
1 parent aaa1eeb commit e7b25a5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion LorisAngel.Bot/LCommandHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,8 @@ private async Task UserJoinedAsync(SocketGuildUser user)

private async Task LeftGuildAsync(SocketGuild guild)
{
if (guild == null) return;

var sg = bot.GetGuild(730573219374825523);
await sg.GetTextChannel(739308321655226469).SendMessageAsync($"[{bot.Guilds.Count}] **Left** guild **{guild.Name}**");
}
Expand Down Expand Up @@ -328,4 +330,4 @@ public static int GetUserGuildCount(ulong id)
return count;
}
}
}
}

0 comments on commit e7b25a5

Please sign in to comment.