GuildMember

export class GuildMember extends PartialTextBasedChannel(Base)
export class GuildMember extends PartialTextBasedChannel(Base)
Represents a member of a guild on Discord.

Extends

PartialTextBasedChannel(Base)
avatar:string | null
The guild member's avatar hash
Readonly
bannable:boolean
Whether this member is bannable by the client user
Readonly
communicationDisabledUntil:Date | null
The time this member's timeout will be removed
communicationDisabledUntilTimestamp:number | null
The timestamp this member's timeout will be removed
Readonly
displayColor:number
The displayed role color of this member in base 10
Readonly
displayHexColor:HexColorString
The displayed role color of this member in hexadecimal
Readonly
displayName:string
The nickname of this member, or their user display name if they don't have one
Readonly
dmChannel:DMChannel | null
The DM between the client's user and this member
flags:Readonly<GuildMemberFlagsBitField>
The flags of this member
guild:Guild
The guild that this member is part of
Readonly
The member's id
Readonly
joinedAt:Date | null
The time this member joined the guild
joinedTimestamp:number | null
The timestamp the member joined the guild at
Readonly
kickable:boolean
Whether this member is kickable by the client user
Readonly
manageable:boolean
Whether the client user is above this user in the hierarchy, according to role position and guild ownership. This is a prerequisite for many moderative actions.
Readonly
moderatable:boolean
Whether this member is moderatable by the client user
nickname:string | null
The nickname of this member, if they have one
Readonly
partial:false
Whether this GuildMember is a partial
pending:boolean
Whether this member has yet to pass the guild's membership gate
Readonly
permissions:Readonly<PermissionsBitField>
The overall set of permissions for this member, taking only roles and owner status into account
Readonly
premiumSince:Date | null
The last time this member started boosting the guild
premiumSinceTimestamp:number | null
The last timestamp this member started boosting the guild
Readonly
presence:Presence | null
The presence of this guild member
A manager for the roles belonging to this member
user:User
The user that this guild member instance represents
Readonly
The voice state of this member
avatarURL(options?):string | null
A link to the member's guild avatar.
Returns
NameTypeOptionalDescription
optionsImageURLOptionsYesOptions for the image URL
ban(options?):Promise<GuildMember>
Bans this guild member.
NameTypeOptionalDescription
optionsBanOptionsYesOptions for the ban
createDM(force?):Promise<DMChannel>
Creates a DM channel between the client and this member.
NameTypeOptionalDescription
forcebooleanYesWhether to skip the cache check and request the API
deleteDM():Promise<DMChannel>
Deletes any DMs with this member.
disableCommunicationUntil(communicationDisabledUntil, reason?):Promise<GuildMember>
Times this guild member out.
NameTypeOptionalDescription
communicationDisabledUntilDateResolvable | nullNoThe date or timestamp for the member's communication to be disabled until. Provide null to remove the timeout.
reasonstringYesThe reason for this timeout.
displayAvatarURL(options?):string
A link to the member's guild avatar if they have one. Otherwise, a link to their displayAvatarURL will be returned.
NameTypeOptionalDescription
optionsImageURLOptionsYesOptions for the Image URL
edit(options):Promise<GuildMember>
Edits this member.
NameTypeOptionalDescription
optionsGuildMemberEditOptionsNoThe options to provide
fetch(force?):Promise<GuildMember>
Fetches this GuildMember.
NameTypeOptionalDescription
forcebooleanYesWhether to skip the cache check and request the API
isCommunicationDisabled():this is GuildMember & { communicationDisabledUntilTimestamp: number; readonly communicationDisabledUntil: Date; }
Whether this member is currently timed out
kick(reason?):Promise<GuildMember>
Kicks this member from the guild.
NameTypeOptionalDescription
reasonstringYesReason for kicking user
permissionsIn(channel):Readonly<PermissionsBitField>
Returns channel.permissionsFor(guildMember). Returns permissions for a member in a guild channel, taking into account roles and permission overwrites.
NameTypeOptionalDescription
channelGuildChannelResolvableNoThe guild channel to use as context
setFlags(flags, reason?):Promise<GuildMember>
Sets the flags for this member.
NameTypeOptionalDescription
flagsGuildMemberFlagsResolvableNoThe flags to set
reasonstringYesReason for setting the flags
setNickname(nick, reason?):Promise<GuildMember>
Sets the nickname for this member.
NameTypeOptionalDescription
nickstring | nullNoThe nickname for the guild member, or null if you want to reset their nickname
reasonstringYesReason for setting the nickname
timeout(timeout, reason?):Promise<GuildMember>
Times this guild member out.
NameTypeOptionalDescription
timeoutnumber | nullNoThe duration in milliseconds for the member's communication to be disabled. Provide null to remove the timeout.
reasonstringYesThe reason for this timeout.
toJSON():unknown
toString():UserMention
When concatenated with a string, this automatically returns the user's mention instead of the GuildMember object.
valueOf():string