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
ulongGuild ID
userId
ulongUser ID
accessToken
stringAccess token
nick
stringUser nickname
roleIds
IEnumerable<ulong>Ids of roles to add to the new member.
muted
boolWhether this user should be muted on join
deafened
boolWhether this user should be deafened on join
Returns
- Task<DiscordMember>
Only returns the member if they were not already in the guild