Table of Contents

Method AddGuildMemberAsync

Namespace
DSharpPlus
Assembly
DSharpPlus.Rest.dll

AddGuildMemberAsync(ulong, ulong, string, string, IEnumerable<ulong>, bool, bool)

Adds a member to a guild

public Task<DiscordMember?> AddGuildMemberAsync(ulong guildId, ulong userId, string accessToken, string nick, IEnumerable<ulong> roleIds, bool muted, bool deafened)

Parameters

guildId ulong

Guild ID

userId ulong

User ID

accessToken string

Access token

nick string

User nickname

roleIds IEnumerable<ulong>

Ids of roles to add to the new member.

muted bool

Whether this user should be muted on join

deafened bool

Whether this user should be deafened on join

Returns

Task<DiscordMember>

Only returns the member if they were not already in the guild