public async Task <IReadOnlyList <PermissionGroup> > GetPermissionGroups(ulong userId, ulong?guildId) { if (!guildId.HasValue) { return(GetDefaultPermissions(await _client.GetUserAsync(userId))); } var user = await _client.GetGuildUserAsync(userId, guildId.Value); var guild = await _client.GetGuildAsync(guildId.Value); return(await GetPermissionGroups(user, guild)); }
/// <inheritdoc /> public Task <IDiscordGuildUser> GetMemberAsync(ulong id) { return(client.GetGuildUserAsync(id, Id)); }