Options
All
  • Public
  • Public/Protected
  • All
Menu

Class BotUser

Represents the bot's user account

Hierarchy

Index

Constructors

constructor

Properties

avatarHash

avatarHash: string | null

User's avatar image. Possibly null if user does not have an avatar image

bot

bot: Bot

The Bot operating this structure

dm

dm: DMChannel | undefined

This user's DM channel with the bot, if cached

email

email: string | null | undefined

The user's email

flags

flags: UserFlags | undefined

The flags on a user's account

hashtag

hashtag: string

User's 4-digit discord-tag

id

The user's ID

isBot

isBot: boolean | undefined

Whether the user is a bot

locale

locale: string

The user's chosen language option

mfaEnabled

mfaEnabled: boolean | undefined

Whether the user has two factor enabled on their account

nitroType

nitroType: NitroType | undefined

NitroType object containing the type of nitro subscription on a user's account

presence

presence: BotPresence

publicFlags

publicFlags: UserFlags | undefined

The public flags on a user's account

system

system: boolean | undefined

Whether the user is an Official Discord System user (part of urgent message system)

username

username: string

User's username, not unique across the platform

verified

verified: boolean | undefined

Whether the email on this user has been verified

Accessors

fullName

  • get fullName(): string

Methods

avatarURL

  • Returns a user's avatar URL. Returns the default user avatar if the user does not have an avatar. Note: the default user avatar only supports type UserAvatarFormat.PNG

    Parameters

    • Default value format: UserAvatarFormat = UserAvatarFormat.PNG

      The avatar image format

    • Optional size: undefined | number

      The avatar image size

    Returns string

clone

  • clone(): this

createDM

fetchGuilds

leaveGuild

  • leaveGuild(guildId: Snowflake): Promise<void>

modify

sendMessage

  • sendMessage(...args: Parameters<TextChannel["sendMessage"]>): ReturnType<TextChannel["sendMessage"]>

update

Generated using TypeDoc