Class ClientExtensions
Assembly: Discord.Net.Rest.dll​
View Source​
Declaration
public static class ClientExtensions
Methods​
AddGuildUserAsync(BaseDiscordClient, UInt64, UInt64, String, Action<AddGuildUserProperties>, RequestOptions)​
Adds a user to the specified guild.
View Source​
Declaration
public static Task AddGuildUserAsync(this BaseDiscordClient client, ulong guildId, ulong userId, string accessToken, Action<AddGuildUserProperties> func = null, RequestOptions options = null)
Returns​
System.Threading.Tasks.Task
Parameters​
Type | Name | Description |
---|---|---|
Discord.Rest.BaseDiscordClient | client | The Discord client object. |
System.UInt64 | guildId | The snowflake identifier of the guild. |
System.UInt64 | userId | The snowflake identifier of the user. |
System.String | accessToken | The OAuth2 access token for the user, requested with the guilds.join scope. |
System.Action<Discord.AddGuildUserProperties> | func | The delegate containing the properties to be applied to the user upon being added to the guild. |
Discord.RequestOptions | options | The options to be used when sending the request. |