fix issues with some commands that tried to resolve guild member in DMs

This commit is contained in:
13xforever 2019-02-05 16:43:36 +05:00
parent acc53b908a
commit 8961f23bfc

View File

@ -16,6 +16,8 @@ namespace CompatBot.Utils
{
public static DiscordMember GetMember(this DiscordClient client, DiscordGuild guild, ulong userId)
{
if (guild == null)
return GetMember(client, userId);
return (from g in client.Guilds
where g.Key == guild.Id
from u in g.Value.Members