feature: add Add Guild Member endpoint (#1183)
* Add AddGuildMember Oauth endpoint support * Concat RoleIds if already exists. * Use local ids variable.
This commit is contained in:
committed by
Christopher F
parent
7dd2268982
commit
8ef5f8120f
@@ -537,6 +537,10 @@ namespace Discord.Rest
|
||||
public IAsyncEnumerable<IReadOnlyCollection<RestGuildUser>> GetUsersAsync(RequestOptions options = null)
|
||||
=> GuildHelper.GetUsersAsync(this, Discord, null, null, options);
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task<RestGuildUser> AddGuildUserAsync(ulong id, string accessToken, Action<AddGuildUserProperties> func = null, RequestOptions options = null)
|
||||
=> GuildHelper.AddGuildUserAsync(this, Discord, id, accessToken, func, options);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a user from this guild.
|
||||
/// </summary>
|
||||
@@ -800,6 +804,10 @@ namespace Discord.Rest
|
||||
async Task<IRole> IGuild.CreateRoleAsync(string name, GuildPermissions? permissions, Color? color, bool isHoisted, RequestOptions options)
|
||||
=> await CreateRoleAsync(name, permissions, color, isHoisted, options).ConfigureAwait(false);
|
||||
|
||||
/// <inheritdoc />
|
||||
async Task<IGuildUser> IGuild.AddGuildUserAsync(ulong userId, string accessToken, Action<AddGuildUserProperties> func, RequestOptions options)
|
||||
=> await AddGuildUserAsync(userId, accessToken, func, options);
|
||||
|
||||
/// <inheritdoc />
|
||||
async Task<IGuildUser> IGuild.GetUserAsync(ulong id, CacheMode mode, RequestOptions options)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user