Class ClientExtensions
public static class ClientExtensions
- Inheritance
-
ClientExtensions
- Inherited Members
Methods
AddGuildUserAsync(BaseDiscordClient, ulong, ulong, string, Action<AddGuildUserProperties>, RequestOptions)
Adds a user to the specified guild.
public static Task AddGuildUserAsync(this BaseDiscordClient client, ulong guildId, ulong userId, string accessToken, Action<AddGuildUserProperties> func = null, RequestOptions options = null)
Parameters
clientBaseDiscordClientThe Discord client object.
guildIdulongThe snowflake identifier of the guild.
userIdulongThe snowflake identifier of the user.
accessTokenstringThe OAuth2 access token for the user, requested with the guilds.join scope.
funcAction<AddGuildUserProperties>The delegate containing the properties to be applied to the user upon being added to the guild.
optionsRequestOptionsThe options to be used when sending the request.
Returns
Remarks
This method requires you have an OAuth2 access token for the user, requested with the guilds.join scope, and that the bot have the MANAGE_INVITES permission in the guild.