コード例 #1
0
        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));
        }
コード例 #2
0
 /// <inheritdoc />
 public Task <IDiscordGuildUser> GetMemberAsync(ulong id)
 {
     return(client.GetGuildUserAsync(id, Id));
 }