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
client
BaseDiscordClientThe Discord client object.
guildId
ulongThe snowflake identifier of the guild.
userId
ulongThe snowflake identifier of the user.
accessToken
stringThe OAuth2 access token for the user, requested with the guilds.join scope.
func
Action<AddGuildUserProperties>The delegate containing the properties to be applied to the user upon being added to the guild.
options
RequestOptionsThe 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.