Skip to content

DiscordGuildMember

The DiscordGuildMember class represents a member of a Discord guild (server) and provides methods to interact with and manage the guild member.

Properties

user

DiscordGuildMember.user  :: Objects.DiscordUser

guildId

DiscordGuildMember.guildId  :: string

type

DiscordGuildMember.type  :: string

The type of the DiscordGuildMember. Default is “DiscordGuildMember”.

Methods

kickAsync

DiscordGuildMember : kickAsync (

     deleteMessagesSeconds: number?
)  -> Vendor.Future

Kicks the guild member asynchronously.

banAsync

DiscordGuildMember : banAsync ()  -> Vendor.Future

Bans the guild member asynchronously.

unbanAsync

DiscordGuildMember : unbanAsync ()  -> Vendor.Future

Unbans the guild member asynchronously.

addRoleAsync

DiscordGuildMember : addRoleAsync (

     roleId: string
)  -> Vendor.Future

Adds a role to the guild member asynchronously.

removeRoleAsync

DiscordGuildMember : removeRoleAsync (

     roleId: string
)  -> Vendor.Future

Removes a role from the guild member asynchronously.

timeoutAsync

DiscordGuildMember : timeoutAsync (

     seconds: number
)  -> Vendor.Future

Times out the guild member asynchronously.

muteAsync

DiscordGuildMember : muteAsync ()  -> Vendor.Future

Mutes the guild member asynchronously.

unmuteAsync

DiscordGuildMember : unmuteAsync ()  -> Vendor.Future

Unmutes the guild member asynchronously.

deafenAsync

DiscordGuildMember : deafenAsync ()  -> Vendor.Future

Deafens the guild member asynchronously.

undeafenAsync

DiscordGuildMember : undeafenAsync ()  -> Vendor.Future

Undeafens the guild member asynchronously.

setNicknameAsync

DiscordGuildMember : setNicknameAsync (

     nickname: string
)  -> Vendor.Future

Sets the nickname of the guild member asynchronously.

modifyAsync

DiscordGuildMember : modifyAsync (

     memberBuilder: Builders.MemberBuilder
)  -> Vendor.Future

Modifies the guild member asynchronously.

Functions

new

DiscordGuildMember . new (

     discordClient: any
     userId: string
     guildId: string
     memberData: table
)  -> ()

Creates a new DiscordGuildMember instance.