Skip to main content

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​
TypeNameDescription
Discord.Rest.BaseDiscordClientclientThe Discord client object.
System.UInt64guildIdThe snowflake identifier of the guild.
System.UInt64userIdThe snowflake identifier of the user.
System.StringaccessTokenThe OAuth2 access token for the user, requested with the guilds.join scope.
System.Action<Discord.AddGuildUserProperties>funcThe delegate containing the properties to be applied to the user upon being added to the guild.
Discord.RequestOptionsoptionsThe options to be used when sending the request.