Table of Contents

Class ClientExtensions

Namespace
Discord.Rest
Assembly
Discord.Net.Rest.dll
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 BaseDiscordClient

The Discord client object.

guildId ulong

The snowflake identifier of the guild.

userId ulong

The snowflake identifier of the user.

accessToken string

The 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 RequestOptions

The options to be used when sending the request.

Returns

Task

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.