public override Matbot.Client.User GetChatMemberById(ChatItemId chatId, ulong id) { DiscordChatId chat = (DiscordChatId)chatId; Discord.Server s = client.GetServer(chat.ServerID); foreach (Discord.Channel c in s.AllChannels) { if (c.Id == chatId.Ids[DiscordID]) { return(UserFromDiscordUser(c.GetUser(id))); } } return(null); }
private Discord.Channel GetChannelByDiscordChatId(DiscordChatId id) { if (id.ServerID == 0) { return(client.GetChannel(id.Ids[DiscordID])); } else { Discord.Server s = client.GetServer(id.ServerID); foreach (Discord.Channel c in s.AllChannels) { if (c.Id == id.Ids[DiscordID]) { return(c); } } } return(null); }