RestManager
@discordeno/rest • Docs
Documentation / @discordeno/rest / RestManager
Interface: RestManager
Properties
addDmRecipient()
addDmRecipient: (
channelId
,userId
,options
) =>Promise
<void
>
Adds a recipient to a group DM.
Parameters
• channelId: BigString
The ID of the group dm to add the user to.
• userId: BigString
The user ID of the user to add to the group dm.
• options: AddDmRecipientOptions
The options for adding the user
Returns
Promise
<void
>
Remarks
Requires an OAuth2 access token with the gdm.join
scope
See
https://discord.com/developers/docs/resources/channel#group-dm-add-recipient
Defined in
addGuildMember()
addGuildMember: (
guildId
,userId
,options
) =>Promise
<void
>
Adds a member to a guild.
Parameters
• guildId: BigString
The ID of the thread to add the member to.
• userId: BigString
The user ID of the member to add to the thread.
• options: AddGuildMemberOptions
The options for the add of a guild member
Returns
Promise
<void
>
Remarks
Requires the bot to be in the specified server
Requires an OAuth2 access token with the guilds.join
scope
Fires a Guild Member Add gateway event.
See
https://discord.com/developers/docs/resources/guild#add-guild-member
Defined in
addReaction()
addReaction: (
channelId
,messageId
,reaction
) =>Promise
<void
>
Adds a reaction to a message.
Parameters
• channelId: BigString
The ID of the channel the message to add a reaction to is in.
• messageId: BigString
The ID of the message to add a reaction to.
• reaction: string
The reaction to add to the message.
Returns
Promise
<void
>
Remarks
Requires the READ_MESSAGE_HISTORY
permission.
If nobody else has reacted to the message:
- Requires the
ADD_REACTIONS
permission.
Fires a Message Reaction Add gateway event.
See
https://discord.com/developers/docs/resources/channel#create-reaction
Defined in
addReactions()
addReactions: (
channelId
,messageId
,reactions
,ordered
?) =>Promise
<void
>
Adds multiple a reaction to a message.
This function uses the addReaction()
helper behind the scenes.
Parameters
• channelId: BigString
The ID of the channel the message to add reactions to is in.
• messageId: BigString
The ID of the message to add the reactions to.
• reactions: string
[]
The reactions to add to the message.
• ordered?: boolean
Whether the reactions must be added in order or not.
Returns
Promise
<void
>
Remarks
Requires the READ_MESSAGE_HISTORY
permission.
If nobody else has reacted to the message:
- Requires the
ADD_REACTIONS
permission.
Fires a Message Reaction Add gateway event for every reaction added.
Defined in
addRole()
addRole: (
guildId
,userId
,roleId
,reason
?) =>Promise
<void
>
Adds a role to a member.
Parameters
• guildId: BigString
The ID of the guild the member to add the role to is in.
• userId: BigString
The user ID of the member to add the role to.
• roleId: BigString
The ID of the role to add to the member.
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<void
>
Remarks
Requires the MANAGE_ROLES
permission.
Fires a Guild Member Update gateway event.
See
https://discord.com/developers/docs/resources/guild#add-guild-member-role
Defined in
addThreadMember()
addThreadMember: (
channelId
,userId
) =>Promise
<void
>
Adds a member to a thread.
Parameters
• channelId: BigString
The ID of the thread to add the member to.
• userId: BigString
The user ID of the member to add to the thread.
Returns
Promise
<void
>
Remarks
Requires the ability to send messages in the thread. Requires the thread not be archived.
Fires a Thread Members Update gateway event.
See
https://discord.com/developers/docs/resources/channel#add-thread-member
Defined in
applicationId
applicationId:
bigint
The application id. Normally this is not required for recent bots but old bot's application id is sometimes different from the bot id so it is required for those bots.
Defined in
authorization?
optional
authorization:string
The authorization header value to attach when sending requests to the proxy.
Defined in
authorizationHeader
authorizationHeader:
string
The authorization header name to attach when sending requests to the proxy
Defined in
banMember()
banMember: (
guildId
,userId
,options
?,reason
?) =>Promise
<void
>
Bans a user from a guild.
Parameters
• guildId: BigString
The ID of the guild to ban the user from.
• userId: BigString
The ID of the user to ban from the guild.
• options?: CreateGuildBan
The parameters for the creation of the ban.
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<void
>
Remarks
Requires the BAN_MEMBERS
permission.
Fires a Guild Ban Add gateway event.
See
https://discord.com/developers/docs/resources/guild#create-guild-ban
Defined in
baseUrl
baseUrl:
string
The base url to connect to. If you create a proxy rest, that url would go here. IT SHOULD NOT END WITH A /
Default
https://discord.com/api
Defined in
bulkBanMembers()
bulkBanMembers: (
guildId
,options
,reason
?) =>Promise
<object
>
Bans up to 200 users from a guild.
Parameters
• guildId: BigString
The ID of the guild to ban the users from.
• options: CreateGuildBulkBan
The users to ban and the other options for the ban.
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<object
>
bannedUsers
bannedUsers:
string
[]
failedUsers
failedUsers:
string
[]
Remarks
Requires the BAN_MEMBERS
and MANAGE_GUILD
permissions.
If all provided users fail to be banned, discord will respond with an error (code: 500000: Failed to ban users
)
Fires as many Guild Ban Add gateway events as many user where banned.
See
https://discord.com/developers/docs/resources/guild#bulk-guild-ban
Defined in
changeToDiscordFormat()
changeToDiscordFormat: (
obj
) =>any
Reshapes and modifies the obj as needed to make it ready for discords api.
Parameters
• obj: any
Returns
any
Defined in
checkRateLimits()
checkRateLimits: (
url
,identifier
) =>number
|false
Check the rate limits for a url or a bucket.
Parameters
• url: string
• identifier: string
Returns
number
| false
Defined in
consumeEntitlement()
consumeEntitlement: (
applicationId
,entitlementId
) =>Promise
<void
>
For One-Time Purchase consumable SKUs, marks a given entitlement for the user as consumed. The entitlement will have consumed: true
when using List Entitlements
Parameters
• applicationId: BigString
• entitlementId: BigString
Returns
Promise
<void
>
Defined in
createApplicationEmoji()
createApplicationEmoji: (
options
) =>Promise
<object
>
Creates an emoji for the application.
Parameters
• options: CreateApplicationEmoji
The parameters for the creation of the emoji.
Returns
Promise
<object
>
An instance of the created DiscordEmoji.
animated
animated:
undefined
|boolean
available
available:
undefined
|boolean
id
id:
undefined
|string
managed
managed:
undefined
|boolean
name
name:
undefined
|string
requireColons
requireColons:
undefined
|boolean
roles
roles:
undefined
|string
[]
user
user:
undefined
|object
See
https://discord.com/developers/docs/resources/emoji#create-application-emoji
Defined in
createAutomodRule()
createAutomodRule: (
guildId
,options
,reason
?) =>Promise
<object
>
Creates an automod rule in a guild.
Parameters
• guildId: BigString
The ID of the guild to create the rule in.
• options: CreateAutoModerationRuleOptions
The parameters for the creation of the rule.
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<object
>
An instance of the created DiscordAutoModerationRule.
actions
actions:
object
[]
creatorId
creatorId:
string
enabled
enabled:
boolean
eventType
eventType:
AutoModerationEventTypes
exemptChannels
exemptChannels:
string
[]
exemptRoles
exemptRoles:
string
[]
guildId
guildId:
string
id
id:
string
name
name:
string
triggerMetadata
triggerMetadata:
object
triggerMetadata.allowList
triggerMetadata.allowList:
undefined
|string
[]
triggerMetadata.keywordFilter
triggerMetadata.keywordFilter:
undefined
|string
[]
triggerMetadata.mentionRaidProtectionEnabled
triggerMetadata.mentionRaidProtectionEnabled:
undefined
|boolean
triggerMetadata.mentionTotalLimit
triggerMetadata.mentionTotalLimit:
undefined
|number
triggerMetadata.presets
triggerMetadata.presets:
undefined
|DiscordAutoModerationRuleTriggerMetadataPresets
[]
triggerMetadata.regexPatterns
triggerMetadata.regexPatterns:
string
[]
triggerType
triggerType:
AutoModerationTriggerTypes
Remarks
Requires the MANAGE_GUILD
permission.
Fires an Auto Moderation Rule Create gateway event.
See
https://discord.com/developers/docs/resources/auto-moderation#create-auto-moderation-rule
Defined in
createBaseHeaders()
createBaseHeaders: () =>
Record
<string
,string
>
Allows the user to inject custom headers that will be sent with every request.
Returns
Record
<string
, string
>
Defined in
createChannel()
createChannel: (
guildId
,options
,reason
?) =>Promise
<object
>
Creates a channel within a guild.
Parameters
• guildId: BigString
The ID of the guild to create the channel within.
• options: CreateGuildChannel
The parameters for the creation of the channel.
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<object
>
An instance of the created DiscordChannel.
applicationId
applicationId:
undefined
|string
appliedTags
appliedTags:
undefined
|string
[]
availableTags
availableTags:
undefined
|object
[]
bitrate
bitrate:
undefined
|number
defaultAutoArchiveDuration
defaultAutoArchiveDuration:
undefined
|number
defaultForumLayout
defaultForumLayout:
undefined
|ForumLayout
defaultReactionEmoji
defaultReactionEmoji:
undefined
|null
|object
defaultSortOrder
defaultSortOrder:
undefined
|null
|SortOrderTypes
defaultThreadRateLimitPerUser
defaultThreadRateLimitPerUser:
undefined
|number
flags
flags:
undefined
|ChannelFlags
guildId
guildId:
undefined
|string
icon
icon:
undefined
|string
id
id:
string
lastMessageId
lastMessageId:
undefined
|null
|string
lastPinTimestamp
lastPinTimestamp:
undefined
|null
|string
managed
managed:
undefined
|boolean
member
member:
undefined
|object
memberCount
memberCount:
undefined
|number
messageCount
messageCount:
undefined
|number
name
name:
undefined
|string
newlyCreated
newlyCreated:
undefined
|boolean
nsfw
nsfw:
undefined
|boolean
ownerId
ownerId:
undefined
|string
parentId
parentId:
undefined
|null
|string
permissionOverwrites
permissionOverwrites:
undefined
|object
[]
permissions
permissions:
undefined
|string
position
position:
undefined
|number
rateLimitPerUser
rateLimitPerUser:
undefined
|number
recipients
recipients:
undefined
|object
[]
rtcRegion
rtcRegion:
undefined
|null
|string
threadMetadata
threadMetadata:
undefined
|object
topic
topic:
undefined
|null
|string
totalMessageSent
totalMessageSent:
undefined
|number
type
type:
ChannelTypes
userLimit
userLimit:
undefined
|number
videoQualityMode
videoQualityMode:
undefined
|VideoQualityModes
Remarks
Requires the MANAGE_CHANNELS
permission.
If setting permission overwrites, only the permissions the bot user has in the guild can be allowed or denied.
Setting the MANAGE_ROLES
permission is only possible for guild administrators.
Fires a Channel Create gateway event.
See
https://discord.com/developers/docs/resources/guild#create-guild-channel
Defined in
createEmoji()
createEmoji: (
guildId
,options
,reason
?) =>Promise
<object
>
Creates an emoji in a guild.
Parameters
• guildId: BigString
The ID of the guild in which to create the emoji.
• options: CreateGuildEmoji
The parameters for the creation of the emoji.
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<object
>
An instance of the created DiscordEmoji.
animated
animated:
undefined
|boolean
available
available:
undefined
|boolean
id
id:
undefined
|string
managed
managed:
undefined
|boolean
name
name:
undefined
|string
requireColons
requireColons:
undefined
|boolean
roles
roles:
undefined
|string
[]
user
user:
undefined
|object
Remarks
Requires the CREATE_GUILD_EXPRESSIONS
permission.
Emojis have a maximum file size of 256 kilobits. Attempting to upload a larger emoji will cause the route to return 400 Bad Request.
Fires a Guild Emojis Update gateway event.
See
https://discord.com/developers/docs/resources/emoji#create-guild-emoji
Defined in
createForumThread()
createForumThread: (
channelId
,options
,reason
?) =>Promise
<object
>
Creates a new thread in a forum channel or media channel, and sends a message within the created thread.
Parameters
• channelId: BigString
The ID of the forum channel to create the thread within.
• options: CreateForumPostWithMessage
The parameters for the creation of the thread.
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<object
>
An instance of DiscordChannel with a nested DiscordChannel object.
applicationId
applicationId:
undefined
|string
appliedTags
appliedTags:
undefined
|string
[]
availableTags
availableTags:
undefined
|object
[]
bitrate
bitrate:
undefined
|number
defaultAutoArchiveDuration
defaultAutoArchiveDuration:
undefined
|number
defaultForumLayout
defaultForumLayout:
undefined
|ForumLayout
defaultReactionEmoji
defaultReactionEmoji:
undefined
|null
|object
defaultSortOrder
defaultSortOrder:
undefined
|null
|SortOrderTypes
defaultThreadRateLimitPerUser
defaultThreadRateLimitPerUser:
undefined
|number
flags
flags:
undefined
|ChannelFlags
guildId
guildId:
undefined
|string
icon
icon:
undefined
|string
id
id:
string
lastMessageId
lastMessageId:
undefined
|null
|string
lastPinTimestamp
lastPinTimestamp:
undefined
|null
|string
managed
managed:
undefined
|boolean
member
member:
undefined
|object
memberCount
memberCount:
undefined
|number
messageCount
messageCount:
undefined
|number
name
name:
undefined
|string
newlyCreated
newlyCreated:
undefined
|boolean
nsfw
nsfw:
undefined
|boolean
ownerId
ownerId:
undefined
|string
parentId
parentId:
undefined
|null
|string
permissionOverwrites
permissionOverwrites:
undefined
|object
[]
permissions
permissions:
undefined
|string
position
position:
undefined
|number
rateLimitPerUser
rateLimitPerUser:
undefined
|number
recipients
recipients:
undefined
|object
[]
rtcRegion
rtcRegion:
undefined
|null
|string
threadMetadata
threadMetadata:
undefined
|object
topic
topic:
undefined
|null
|string
totalMessageSent
totalMessageSent:
undefined
|number
type
type:
ChannelTypes
userLimit
userLimit:
undefined
|number
videoQualityMode
videoQualityMode:
undefined
|VideoQualityModes
Remarks
Requires the CREATE_MESSAGES
permission.
Fires a Thread Create gateway event. Fires a Message Create gateway event.
See
https://discord.com/developers/docs/resources/channel#start-thread-in-forum-or-media-channel
Defined in
createGlobalApplicationCommand()
createGlobalApplicationCommand: (
command
,options
?) =>Promise
<object
>
Creates an application command accessible globally; across different guilds and channels.
Parameters
• command: CreateApplicationCommand
The command to create.
• options?: CreateGlobalApplicationCommandOptions
Additional options for the endpoint
Returns
Promise
<object
>
An instance of the created DiscordApplicationCommand.
applicationId
applicationId:
string
contexts
contexts:
undefined
|null
|DiscordInteractionContextType
[]
defaultMemberPermissions
defaultMemberPermissions:
undefined
|null
|string
description
description:
undefined
|string
descriptionLocalizations
descriptionLocalizations:
undefined
|null
|object
dmPermission
dmPermission:
undefined
|boolean
guildId
guildId:
undefined
|string
handler
handler:
undefined
|DiscordInteractionEntryPointCommandHandlerType
id
id:
string
integrationTypes
integrationTypes:
undefined
|DiscordApplicationIntegrationType
[]
name
name:
string
nameLocalizations
nameLocalizations:
undefined
|null
|object
nsfw
nsfw:
undefined
|boolean
options
options:
undefined
|object
[]
type
type:
undefined
|ApplicationCommandTypes
version
version:
undefined
|string
Remarks
⚠️ Creating a command with the same name as an existing command for your application will overwrite the old command. ⚠️ Global commands once created are cached for periods of an hour, so changes made to existing commands will take an hour to surface. ⚠️ You can only create up to 200 new commands daily.
When using the bearer token the token needs the applications.commands.update
scope and must be a Client grant
token.
You will be able to update only your own application commands
See
Defined in
createGuild()
createGuild: (
options
) =>Promise
<object
>
Creates a guild.
Parameters
• options: CreateGuild
The parameters for the creation of the guild.
Returns
Promise
<object
>
An instance of the created DiscordGuild.
afkChannelId
afkChannelId:
null
|string
afkTimeout
afkTimeout:
number
applicationId
applicationId:
null
|string
approximateMemberCount
approximateMemberCount:
undefined
|number
approximatePresenceCount
approximatePresenceCount:
undefined
|number
banner
banner:
null
|string
channels
channels:
undefined
|object
[]
defaultMessageNotifications
defaultMessageNotifications:
DefaultMessageNotificationLevels
description
description:
null
|string
discoverySplash
discoverySplash:
null
|string
emojis
emojis:
object
[]
explicitContentFilter
explicitContentFilter:
ExplicitContentFilterLevels
features
features:
GuildFeatures
[]
icon
icon:
null
|string
iconHash
iconHash:
undefined
|null
|string
id
id:
string
joinedAt
joinedAt:
undefined
|string
large
large:
undefined
|boolean
maxMembers
maxMembers:
undefined
|number
maxPresences
maxPresences:
undefined
|null
|number
maxStageVideoChannelUsers
maxStageVideoChannelUsers:
undefined
|number
maxVideoChannelUsers
maxVideoChannelUsers:
undefined
|number
memberCount
memberCount:
undefined
|number
members
members:
undefined
|object
[]
mfaLevel
mfaLevel:
MfaLevels
name
name:
string
nsfwLevel
nsfwLevel:
GuildNsfwLevel
owner
owner:
undefined
|boolean
ownerId
ownerId:
string
permissions
permissions:
undefined
|string
preferredLocale
preferredLocale:
string
premiumProgressBarEnabled
premiumProgressBarEnabled:
boolean
premiumSubscriptionCount
premiumSubscriptionCount:
undefined
|number
premiumTier
premiumTier:
PremiumTiers
presences
presences:
undefined
|object
[]
publicUpdatesChannelId
publicUpdatesChannelId:
null
|string
roles
roles:
object
[]
rulesChannelId
rulesChannelId:
null
|string
safetyAlertsChannelId
safetyAlertsChannelId:
null
|string
soundboardSounds
soundboardSounds:
undefined
|object
[]
splash
splash:
null
|string
stageInstances
stageInstances:
undefined
|object
[]
stickers
stickers:
undefined
|object
[]
systemChannelFlags
systemChannelFlags:
SystemChannelFlags
systemChannelId
systemChannelId:
null
|string
threads
threads:
undefined
|object
[]
unavailable
unavailable:
undefined
|boolean
vanityUrlCode
vanityUrlCode:
null
|string
verificationLevel
verificationLevel:
VerificationLevels
voiceStates
voiceStates:
undefined
|object
[]
welcomeScreen
welcomeScreen:
undefined
|object
widgetChannelId
widgetChannelId:
undefined
|null
|string
widgetEnabled
widgetEnabled:
undefined
|boolean
Remarks
⚠️ This route can only be used by bots in fewer than 10 guilds.
Fires a Guild Create gateway event.
See
https://discord.com/developers/docs/resources/guild#create-guild
Defined in
createGuildApplicationCommand()
createGuildApplicationCommand: (
command
,guildId
,options
?) =>Promise
<object
>
Creates an application command only accessible in a specific guild.
Parameters
• command: CreateApplicationCommand
The command to create.
• guildId: BigString
The ID of the guild to create the command for.
• options?: CreateGuildApplicationCommandOptions
Additional options for the endpoint
Returns
Promise
<object
>
An instance of the created DiscordApplicationCommand.
applicationId
applicationId:
string
contexts
contexts:
undefined
|null
|DiscordInteractionContextType
[]
defaultMemberPermissions
defaultMemberPermissions:
undefined
|null
|string
description
description:
undefined
|string
descriptionLocalizations
descriptionLocalizations:
undefined
|null
|object
dmPermission
dmPermission:
undefined
|boolean
guildId
guildId:
undefined
|string
handler
handler:
undefined
|DiscordInteractionEntryPointCommandHandlerType
id
id:
string
integrationTypes
integrationTypes:
undefined
|DiscordApplicationIntegrationType
[]
name
name:
string
nameLocalizations
nameLocalizations:
undefined
|null
|object
nsfw
nsfw:
undefined
|boolean
options
options:
undefined
|object
[]
type
type:
undefined
|ApplicationCommandTypes
version
version:
undefined
|string
Remarks
⚠️ Creating a command with the same name as an existing command for your application will overwrite the old command. ⚠️ You can only create up to 200 new commands daily.
When using the bearer token the token needs the applications.commands.update
scope and must be a Client grant
token.
You will be able to update only your own application commands
See
Defined in
createGuildFromTemplate()
createGuildFromTemplate: (
templateCode
,options
) =>Promise
<object
>
Creates a guild from a template.
Parameters
• templateCode: string
The code of the template.
• options: CreateGuildFromTemplate
The parameters for the creation of the guild.
Returns
Promise
<object
>
An instance of the created DiscordGuild.
afkChannelId
afkChannelId:
null
|string
afkTimeout
afkTimeout:
number
applicationId
applicationId:
null
|string
approximateMemberCount
approximateMemberCount:
undefined
|number
approximatePresenceCount
approximatePresenceCount:
undefined
|number
banner
banner:
null
|string
channels
channels:
undefined
|object
[]
defaultMessageNotifications
defaultMessageNotifications:
DefaultMessageNotificationLevels
description
description:
null
|string
discoverySplash
discoverySplash:
null
|string
emojis
emojis:
object
[]
explicitContentFilter
explicitContentFilter:
ExplicitContentFilterLevels
features
features:
GuildFeatures
[]
icon
icon:
null
|string
iconHash
iconHash:
undefined
|null
|string
id
id:
string
joinedAt
joinedAt:
undefined
|string
large
large:
undefined
|boolean
maxMembers
maxMembers:
undefined
|number
maxPresences
maxPresences:
undefined
|null
|number
maxStageVideoChannelUsers
maxStageVideoChannelUsers:
undefined
|number
maxVideoChannelUsers
maxVideoChannelUsers:
undefined
|number
memberCount
memberCount:
undefined
|number
members
members:
undefined
|object
[]
mfaLevel
mfaLevel:
MfaLevels
name
name:
string
nsfwLevel
nsfwLevel:
GuildNsfwLevel
owner
owner:
undefined
|boolean
ownerId
ownerId:
string
permissions
permissions:
undefined
|string
preferredLocale
preferredLocale:
string
premiumProgressBarEnabled
premiumProgressBarEnabled:
boolean
premiumSubscriptionCount
premiumSubscriptionCount:
undefined
|number
premiumTier
premiumTier:
PremiumTiers
presences
presences:
undefined
|object
[]
publicUpdatesChannelId
publicUpdatesChannelId:
null
|string
roles
roles:
object
[]
rulesChannelId
rulesChannelId:
null
|string
safetyAlertsChannelId
safetyAlertsChannelId:
null
|string
soundboardSounds
soundboardSounds:
undefined
|object
[]
splash
splash:
null
|string
stageInstances
stageInstances:
undefined
|object
[]
stickers
stickers:
undefined
|object
[]
systemChannelFlags
systemChannelFlags:
SystemChannelFlags
systemChannelId
systemChannelId:
null
|string
threads
threads:
undefined
|object
[]
unavailable
unavailable:
undefined
|boolean
vanityUrlCode
vanityUrlCode:
null
|string
verificationLevel
verificationLevel:
VerificationLevels
voiceStates
voiceStates:
undefined
|object
[]
welcomeScreen
welcomeScreen:
undefined
|object
widgetChannelId
widgetChannelId:
undefined
|null
|string
widgetEnabled
widgetEnabled:
undefined
|boolean
Remarks
⚠️ This route can only be used by bots in fewer than 10 guilds.
Fires a Guild Create gateway event.
See
https://discord.com/developers/docs/resources/guild-template#create-guild-from-guild-template
Defined in
createGuildSoundboardSound()
createGuildSoundboardSound: (
guildId
,options
,reason
?) =>Promise
<object
>
Create a new soundboard sound for the guild.
Parameters
• guildId: BigString
The guild to create the sounds in
• options: CreateGuildSoundboardSound
The options to create the sound
• reason?: string
The audit log reason
Returns
Promise
<object
>
available
available:
boolean
emojiId
emojiId:
null
|string
emojiName
emojiName:
null
|string
guildId
guildId:
undefined
|string
name
name:
string
soundId
soundId:
string
user
user:
undefined
|object
volume
volume:
number
Remarks
Fires a Guild Soundboard Sound Create Gateway event.
Requires the CREATE_GUILD_EXPRESSIONS
permission.
Defined in
createGuildSticker()
createGuildSticker: (
guildId
,options
,reason
?) =>Promise
<object
>
Create a new sticker for the guild.
Parameters
• guildId: BigString
The ID of the guild to get
• options: CreateGuildStickerOptions
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<object
>
available
available:
undefined
|boolean
description
description:
string
formatType
formatType:
StickerFormatTypes
guildId
guildId:
undefined
|string
id
id:
string
name
name:
string
packId
packId:
undefined
|string
sortValue
sortValue:
undefined
|number
tags
tags:
string
type
type:
StickerTypes
user
user:
undefined
|object
Remarks
Requires the CREATE_GUILD_EXPRESSIONS
permission.
Fires a Guild Stickers Update Gateway event.
Every guilds has five free sticker slots by default, and each Boost level will grant access to more slots.
Lottie stickers can only be uploaded on guilds that have either the VERIFIED
and/or the PARTNERED
guild feature.
See
https://discord.com/developers/docs/resources/sticker#create-guild-sticker
Defined in
createGuildTemplate()
createGuildTemplate: (
guildId
,options
) =>Promise
<object
>
Creates a template from a guild.
Parameters
• guildId: BigString
The ID of the guild to create the template from.
• options: CreateTemplate
The parameters for the creation of the template.
Returns
Promise
<object
>
An instance of the created DiscordTemplate.
code
code:
string
createdAt
createdAt:
string
creator
creator:
object
creator.accentColor
creator.accentColor:
undefined
|number
creator.avatar
creator.avatar:
null
|string
creator.avatarDecorationData
creator.avatarDecorationData:
undefined
|object
creator.banner
creator.banner:
undefined
|string
creator.bot
creator.bot:
undefined
|boolean
creator.discriminator
creator.discriminator:
string
creator.email
creator.email:
undefined
|null
|string
creator.flags
creator.flags:
undefined
|number
creator.globalName
creator.globalName:
null
|string
creator.id
creator.id:
string
creator.locale
creator.locale:
undefined
|string
creator.mfaEnabled
creator.mfaEnabled:
undefined
|boolean
creator.premiumType
creator.premiumType:
undefined
|PremiumTypes
creator.publicFlags
creator.publicFlags:
undefined
|number
creator.system
creator.system:
undefined
|boolean
creator.username
creator.username:
string
creator.verified
creator.verified:
undefined
|boolean
creatorId
creatorId:
string
description
description:
null
|string
isDirty
isDirty:
null
|boolean
name
name:
string
serializedSourceGuild
serializedSourceGuild:
object
serializedSourceGuild.afkChannelId
serializedSourceGuild.afkChannelId:
null
|number
serializedSourceGuild.afkTimeout
serializedSourceGuild.afkTimeout:
number
serializedSourceGuild.applicationId
serializedSourceGuild.applicationId:
undefined
|null
|string
serializedSourceGuild.approximateMemberCount
serializedSourceGuild.approximateMemberCount:
undefined
|number
serializedSourceGuild.approximatePresenceCount
serializedSourceGuild.approximatePresenceCount:
undefined
|number
serializedSourceGuild.banner
serializedSourceGuild.banner:
undefined
|null
|string
serializedSourceGuild.channels
serializedSourceGuild.channels:
object
[]
serializedSourceGuild.defaultMessageNotifications
serializedSourceGuild.defaultMessageNotifications:
DefaultMessageNotificationLevels
serializedSourceGuild.description
serializedSourceGuild.description:
null
|string
serializedSourceGuild.discoverySplash
serializedSourceGuild.discoverySplash:
undefined
|null
|string
serializedSourceGuild.emojis
serializedSourceGuild.emojis:
undefined
|object
[]
serializedSourceGuild.explicitContentFilter
serializedSourceGuild.explicitContentFilter:
ExplicitContentFilterLevels
serializedSourceGuild.features
serializedSourceGuild.features:
undefined
|GuildFeatures
[]
serializedSourceGuild.icon
serializedSourceGuild.icon:
undefined
|null
|string
serializedSourceGuild.iconHash
serializedSourceGuild.iconHash:
undefined
|null
|string
serializedSourceGuild.id
serializedSourceGuild.id:
undefined
|string
serializedSourceGuild.joinedAt
serializedSourceGuild.joinedAt:
undefined
|string
serializedSourceGuild.large
serializedSourceGuild.large:
undefined
|boolean
serializedSourceGuild.maxMembers
serializedSourceGuild.maxMembers:
undefined
|number
serializedSourceGuild.maxPresences
serializedSourceGuild.maxPresences:
undefined
|null
|number
serializedSourceGuild.maxStageVideoChannelUsers
serializedSourceGuild.maxStageVideoChannelUsers:
undefined
|number
serializedSourceGuild.maxVideoChannelUsers
serializedSourceGuild.maxVideoChannelUsers:
undefined
|number
serializedSourceGuild.memberCount
serializedSourceGuild.memberCount:
undefined
|number
serializedSourceGuild.members
serializedSourceGuild.members:
undefined
|object
[]
serializedSourceGuild.mfaLevel
serializedSourceGuild.mfaLevel:
undefined
|MfaLevels
serializedSourceGuild.name
serializedSourceGuild.name:
string
serializedSourceGuild.nsfwLevel
serializedSourceGuild.nsfwLevel:
undefined
|GuildNsfwLevel
serializedSourceGuild.owner
serializedSourceGuild.owner:
undefined
|boolean
serializedSourceGuild.ownerId
serializedSourceGuild.ownerId:
undefined
|string
serializedSourceGuild.permissions
serializedSourceGuild.permissions:
undefined
|string
serializedSourceGuild.preferredLocale
serializedSourceGuild.preferredLocale:
string
serializedSourceGuild.premiumProgressBarEnabled
serializedSourceGuild.premiumProgressBarEnabled:
undefined
|boolean
serializedSourceGuild.premiumSubscriptionCount
serializedSourceGuild.premiumSubscriptionCount:
undefined
|number
serializedSourceGuild.premiumTier
serializedSourceGuild.premiumTier:
undefined
|PremiumTiers
serializedSourceGuild.presences
serializedSourceGuild.presences:
undefined
|object
[]
serializedSourceGuild.publicUpdatesChannelId
serializedSourceGuild.publicUpdatesChannelId:
undefined
|null
|string
serializedSourceGuild.roles
serializedSourceGuild.roles:
object
[]
serializedSourceGuild.rulesChannelId
serializedSourceGuild.rulesChannelId:
undefined
|null
|string
serializedSourceGuild.safetyAlertsChannelId
serializedSourceGuild.safetyAlertsChannelId:
undefined
|null
|string
serializedSourceGuild.soundboardSounds
serializedSourceGuild.soundboardSounds:
undefined
|object
[]
serializedSourceGuild.splash
serializedSourceGuild.splash:
undefined
|null
|string
serializedSourceGuild.stageInstances
serializedSourceGuild.stageInstances:
undefined
|object
[]
serializedSourceGuild.stickers
serializedSourceGuild.stickers:
undefined
|object
[]
serializedSourceGuild.systemChannelFlags
serializedSourceGuild.systemChannelFlags:
SystemChannelFlags
serializedSourceGuild.systemChannelId
serializedSourceGuild.systemChannelId:
null
|number
serializedSourceGuild.threads
serializedSourceGuild.threads:
undefined
|object
[]
serializedSourceGuild.unavailable
serializedSourceGuild.unavailable:
undefined
|boolean
serializedSourceGuild.vanityUrlCode
serializedSourceGuild.vanityUrlCode:
undefined
|null
|string
serializedSourceGuild.verificationLevel
serializedSourceGuild.verificationLevel:
VerificationLevels
serializedSourceGuild.voiceStates
serializedSourceGuild.voiceStates:
undefined
|object
[]
serializedSourceGuild.welcomeScreen
serializedSourceGuild.welcomeScreen:
undefined
|object
serializedSourceGuild.widgetChannelId
serializedSourceGuild.widgetChannelId:
undefined
|null
|string
serializedSourceGuild.widgetEnabled
serializedSourceGuild.widgetEnabled:
undefined
|boolean
sourceGuildId
sourceGuildId:
string
updatedAt
updatedAt:
string
usageCount
usageCount:
number
Remarks
Requires the MANAGE_GUILD
permission.
Fires a Guild Update gateway event.
See
https://discord.com/developers/docs/resources/guild-template#create-guild-template
Defined in
createInvite()
createInvite: (
channelId
,options
?,reason
?) =>Promise
<object
>
Creates an invite to a channel in a guild.
Parameters
• channelId: BigString
The ID of the channel to create the invite to.
• options?: CreateChannelInvite
The parameters for the creation of the invite.
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<object
>
An instance of the created DiscordInvite.
approximateMemberCount
approximateMemberCount:
undefined
|number
approximatePresenceCount
approximatePresenceCount:
undefined
|number
channel
channel:
null
|object
code
code:
string
expiresAt
expiresAt:
undefined
|null
|string
guild
guild:
undefined
|object
guildScheduledEvent
guildScheduledEvent:
undefined
|object
inviter
inviter:
undefined
|object
stageInstance
stageInstance:
undefined
|object
targetApplication
targetApplication:
undefined
|object
targetType
targetType:
undefined
|TargetTypes
targetUser
targetUser:
undefined
|object
type
type:
DiscordInviteType
Remarks
Requires the CREATE_INSTANT_INVITE
permission.
Fires an Invite Create gateway event.
See
https://discord.com/developers/docs/resources/channel#create-channel-invite
Defined in
createRequestBody()
createRequestBody: (
method
,options
?) =>RequestBody
Creates the request body and headers that are necessary to send a request. Will handle different types of methods and everything necessary for discord.
Parameters
• method: RequestMethods
• options?: CreateRequestBodyOptions
Returns
Defined in
createRole()
createRole: (
guildId
,options
,reason
?) =>Promise
<object
>
Creates a role in a guild.
Parameters
• guildId: BigString
The ID of the guild to create the role in.
• options: CreateGuildRole
The parameters for the creation of the role.
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<object
>
An instance of the created DiscordRole.
color
color:
number
flags
flags:
RoleFlags
hoist
hoist:
boolean
icon
icon:
undefined
|string
id
id:
string
managed
managed:
boolean
mentionable
mentionable:
boolean
name
name:
string
permissions
permissions:
string
position
position:
number
tags
tags:
undefined
|object
unicodeEmoji
unicodeEmoji:
undefined
|string
Remarks
Requires the MANAGE_ROLES
permission.
Fires a Guild Role Create gateway event.
See
https://discord.com/developers/docs/resources/guild#create-guild-role
Defined in
createScheduledEvent()
createScheduledEvent: (
guildId
,options
,reason
?) =>Promise
<object
>
Creates a scheduled event in a guild.
Parameters
• guildId: BigString
The ID of the guild to create the scheduled event in.
• options: CreateScheduledEvent
The parameters for the creation of the scheduled event.
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<object
>
An instance of the created DiscordScheduledEvent.
channelId
channelId:
null
|string
creator
creator:
undefined
|object
creatorId
creatorId:
undefined
|null
|string
description
description:
undefined
|string
entityId
entityId:
null
|string
entityMetadata
entityMetadata:
null
|object
entityType
entityType:
ScheduledEventEntityType
guildId
guildId:
string
id
id:
string
image
image:
undefined
|null
|string
name
name:
string
privacyLevel
privacyLevel:
GuildOnly
recurrenceRule
recurrenceRule:
null
|object
scheduledEndTime
scheduledEndTime:
null
|string
scheduledStartTime
scheduledStartTime:
string
status
status:
ScheduledEventStatus
userCount
userCount:
undefined
|number
Remarks
Requires the MANAGE_EVENTS
permission.
A guild can only have a maximum of 100 events with a status of ScheduledEventStatus.Active or ScheduledEventStatus.Scheduled (inclusive).
Fires a Guild Scheduled Event Create gateway event.
See
https://discord.com/developers/docs/resources/guild-scheduled-event#create-guild-scheduled-event
Defined in
createStageInstance()
createStageInstance: (
options
,reason
?) =>Promise
<object
>
Creates a stage instance associated with a stage channel.
Parameters
• options: CreateStageInstance
The parameters for the creation of the stage instance.
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<object
>
An instance of the created DiscordStageInstance.
channelId
channelId:
string
guildId
guildId:
string
guildScheduledEventId
guildScheduledEventId:
undefined
|string
id
id:
string
topic
topic:
string
Remarks
Requires the user to be a moderator of the stage channel.
Fires a Stage Instance Create gateway event.
See
https://discord.com/developers/docs/resources/stage-instance#create-stage-instance
Defined in
createTestEntitlement()
createTestEntitlement: (
applicationId
,body
) =>Promise
<Partial
<object
>>
Creates a test entitlement to a given SKU for a given guild or user. Discord will act as though that user or guild has entitlement to your premium offering.
Parameters
• applicationId: BigString
The id of the application to create the entitlement
• body: CreateEntitlement
The options for new entitlement
Returns
Promise
<Partial
<object
>>
Remarks
This endpoint returns a partial entitlement object. It will not contain subscription_id, starts_at, or ends_at, as it's valid in perpetuity.
Defined in
createWebhook()
createWebhook: (
channelId
,options
,reason
?) =>Promise
<Camelize
<DiscordWebhook
>>
Creates a webhook.
Parameters
• channelId: BigString
The ID of the channel to create the webhook in.
• options: CreateWebhook
The parameters for the creation of the webhook.
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<Camelize
<DiscordWebhook
>>
An instance of the created DiscordWebhook.
Remarks
Requires the MANAGE_WEBHOOKS
permission.
⚠️ The webhook name must not contain the substrings 'clyde', or 'discord' (case-insensitive).
Fires a Webhooks Update gateway event.
See
https://discord.com/developers/docs/resources/webhook#create-webhook
Defined in
delete()
delete: (
url
,options
?) =>Promise
<void
>
Make a delete request to the api.
Parameters
• url: string
• options?: Omit
<MakeRequestOptions
, "body"
>
Returns
Promise
<void
>
Defined in
deleteApplicationEmoji()
deleteApplicationEmoji: (
id
) =>Promise
<void
>
Deletes an emoji from the application.
Parameters
• id: BigString
The ID of the emoji to delete.
Returns
Promise
<void
>
See
https://discord.com/developers/docs/resources/emoji#delete-application-emoji
Defined in
deleteAutomodRule()
deleteAutomodRule: (
guildId
,ruleId
,reason
?) =>Promise
<void
>
Deletes an automod rule.
Parameters
• guildId: BigString
The ID of the guild to delete the rule from.
• ruleId: BigString
The ID of the automod rule to delete.
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<void
>
Remarks
Requires the MANAGE_GUILD
permission.
Fires an Auto Moderation Rule Delete gateway event.
See
https://discord.com/developers/docs/resources/auto-moderation#delete-auto-moderation-rule
Defined in
deleteChannel()
deleteChannel: (
channelId
,reason
?) =>Promise
<void
>
Deletes a channel from within a guild.
Parameters
• channelId: BigString
The ID of the channel to delete.
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<void
>
nothing
Remarks
For community guilds, the Rules, Guidelines and Community Update channels cannot be deleted.
If the channel is a thread:
-
Requires the
MANAGE_THREADS
permission. -
Fires a Thread Delete gateway event.
Otherwise:
-
Requires the
MANAGE_CHANNELS
permission. -
⚠️ Deleting a category channel does not delete its child channels. Instead, they will have their
parent_id
property removed, and aChannel Update
gateway event will fire for each of them. -
Fires a Channel Delete gateway event.
See
https://discord.com/developers/docs/resources/channel#deleteclose-channel
Defined in
deleteChannelPermissionOverride()
deleteChannelPermissionOverride: (
channelId
,overwriteId
,reason
?) =>Promise
<void
>
Deletes a permission override for a user or role in a channel.
Parameters
• channelId: BigString
The ID of the channel to delete the permission override of.
• overwriteId: BigString
The ID of the permission override to delete.
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<void
>
Remarks
Requires the MANAGE_ROLES
permission.
Fires a Channel Update gateway event.
See
https://discord.com/developers/docs/resources/channel#delete-channel-permission
Defined in
deleteEmoji()
deleteEmoji: (
guildId
,id
,reason
?) =>Promise
<void
>
Deletes an emoji from a guild.
Parameters
• guildId: BigString
The ID of the guild from which to delete the emoji.
• id: BigString
The ID of the emoji to delete.
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<void
>
Remarks
For emojis created by the current user, requires either the CREATE_GUILD_EXPRESSIONS
or MANAGE_GUILD_EXPRESSIONS
permission.
For other emojis, requires the MANAGE_GUILD_EXPRESSIONS
permission.
Fires a Guild Emojis Update gateway event.
See
https://discord.com/developers/docs/resources/emoji#delete-guild-emoji
Defined in
deleteFollowupMessage()
deleteFollowupMessage: (
token
,messageId
) =>Promise
<void
>
Deletes a follow-up message to an interaction.
Parameters
• token: string
The interaction token to use, provided in the original interaction.
• messageId: BigString
The ID of the message to delete.
Returns
Promise
<void
>
Remarks
Unlike deleteMessage()
, this endpoint allows the bot user to act without needing to see the channel the message is in.
Fires a Message Delete event.
See
https://discord.com/developers/docs/interactions/receiving-and-responding#delete-followup-message
Defined in
deleteGlobalApplicationCommand()
deleteGlobalApplicationCommand: (
commandId
) =>Promise
<void
>
Deletes an application command registered globally.
Parameters
• commandId: BigString
The ID of the command to delete.
Returns
Promise
<void
>
See
Defined in
deleteGuild()
deleteGuild: (
guildId
) =>Promise
<void
>
Deletes a guild.
Parameters
• guildId: BigString
The ID of the guild to delete.
Returns
Promise
<void
>
Remarks
The bot user must be the owner of the guild.
Fires a Guild Delete gateway event.
See
https://discord.com/developers/docs/resources/guild#delete-guild
Defined in
deleteGuildApplicationCommand()
deleteGuildApplicationCommand: (
commandId
,guildId
) =>Promise
<void
>
Deletes an application command registered in a guild.
Parameters
• commandId: BigString
The ID of the command to delete from the guild.
• guildId: BigString
The ID of the guild to delete the command from.
Returns
Promise
<void
>
See
Defined in
deleteGuildSoundboardSound()
deleteGuildSoundboardSound: (
guildId
,soundId
,reason
?) =>Promise
<void
>
Delete the given soundboard sound.
Parameters
• guildId: BigString
The guild to create the sounds in
• soundId: BigString
The sound id to delete
• reason?: string
The audit log reason
Returns
Promise
<void
>
Remarks
Fires a Guild Soundboard Sound Delete Gateway event.
For sounds created by the current user, requires either the CREATE_GUILD_EXPRESSIONS
or MANAGE_GUILD_EXPRESSIONS
permission.
For other sounds, requires the MANAGE_GUILD_EXPRESSIONS
permission.
Defined in
deleteGuildSticker()
deleteGuildSticker: (
guildId
,stickerId
,reason
?) =>Promise
<void
>
Delete a new sticker for the guild.
Parameters
• guildId: BigString
The ID of the guild to get
• stickerId: BigString
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<void
>
Remarks
For stickers created by the current user, requires either the CREATE_GUILD_EXPRESSIONS
or MANAGE_GUILD_EXPRESSIONS
permission.
For other stickers, requires the MANAGE_GUILD_EXPRESSIONS
permission.
Fires a Guild Stickers Update Gateway event.
Every guilds has five free sticker slots by default, and each Boost level will grant access to more slots.
Lottie stickers can only be uploaded on guilds that have either the VERIFIED
and/or the PARTNERED
guild feature.
See
https://discord.com/developers/docs/resources/sticker#delete-guild-sticker
Defined in
deleteGuildTemplate()
deleteGuildTemplate: (
guildId
,templateCode
) =>Promise
<void
>
Deletes a template from a guild.
Parameters
• guildId: BigString
The ID of the guild to delete the template from.
• templateCode: string
The code of the template to delete.
Returns
Promise
<void
>
Remarks
Requires the MANAGE_GUILD
permission.
Fires a Guild Update gateway event.
See
https://discord.com/developers/docs/resources/guild-template#delete-guild-template
Defined in
deleteIntegration()
deleteIntegration: (
guildId
,integrationId
,reason
?) =>Promise
<void
>
Deletes an integration attached to a guild.
Parameters
• guildId: BigString
The ID of the guild from which to delete the integration.
• integrationId: BigString
The ID of the integration to delete from the guild.
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<void
>
Remarks
Requires the MANAGE_GUILD
permission.
Deletes all webhooks associated with the integration, and kicks the associated bot if there is one.
Fires a Guild Integrations Update gateway event. Fires a Integration Delete gateway event.
See
https://discord.com/developers/docs/resources/guild#delete-guild-integration
Defined in
deleteInvite()
deleteInvite: (
inviteCode
,reason
?) =>Promise
<void
>
Deletes an invite to a channel.
Parameters
• inviteCode: string
The invite code of the invite to delete.
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<void
>
Remarks
Requires the MANAGE_CHANNELS
permission.
Fires an Invite Delete gateway event.
See
https://discord.com/developers/docs/resources/channel#delete-channel-invite
Defined in
deleteMessage()
deleteMessage: (
channelId
,messageId
,reason
?) =>Promise
<void
>
Deletes a message from a channel.
Parameters
• channelId: BigString
The ID of the channel to delete the message from.
• messageId: BigString
The ID of the message to delete from the channel.
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<void
>
Remarks
If not deleting own message:
- Requires the
MANAGE_MESSAGES
permission.
Fires a Message Delete gateway event.
See
https://discord.com/developers/docs/resources/channel#delete-message
Defined in
deleteMessages()
deleteMessages: (
channelId
,messageIds
,reason
?) =>Promise
<void
>
Deletes multiple messages from a channel.
Parameters
• channelId: BigString
The ID of the channel to delete the messages from.
• messageIds: BigString
[]
The IDs of the messages to delete from the channel.
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<void
>
Remarks
Requires the MANAGE_MESSAGES
permission.
⚠️ Messages older than 2 weeks old cannot be deleted.
Fires a Message Delete Bulk gateway event.
See
https://discord.com/developers/docs/resources/channel#bulk-delete-messages
Defined in
deleteOriginalInteractionResponse()
deleteOriginalInteractionResponse: (
token
) =>Promise
<void
>
Deletes the initial message response to an interaction.
Parameters
• token: string
The interaction token to use, provided in the original interaction.
Returns
Promise
<void
>
Remarks
Unlike deleteMessage()
, this endpoint allows the bot user to act without needing to see the channel the message is in.
Fires a Message Delete event.
See
Defined in
deleteOwnReaction()
deleteOwnReaction: (
channelId
,messageId
,reaction
) =>Promise
<void
>
Deletes a reaction added by the bot user from a message.
Parameters
• channelId: BigString
The ID of the channel the message to delete the reaction from is in.
• messageId: BigString
The ID of the message to delete the reaction from.
• reaction: string
The reaction to delete from the message.
Returns
Promise
<void
>
Remarks
Requires the READ_MESSAGE_HISTORY
permission.
Fires a Message Reaction Remove gateway event.
See
https://discord.com/developers/docs/resources/channel#delete-own-reaction
Defined in
deleteQueueDelay
deleteQueueDelay:
number
The time in milliseconds to wait before deleting this queue if it is empty. Defaults to 60000(one minute).
Defined in
deleteReactionsAll()
deleteReactionsAll: (
channelId
,messageId
) =>Promise
<void
>
Deletes all reactions for all emojis from a message.
Parameters
• channelId: BigString
The ID of the channel the message to delete the reactions from is in.
• messageId: BigString
The ID of the message to delete the reactions from.
Returns
Promise
<void
>
Remarks
Requires the READ_MESSAGE_HISTORY
permission.
Requires the MANAGE_MESSAGES
permission.
Fires a Message Reaction Remove All gateway event.
See
https://discord.com/developers/docs/resources/channel#delete-all-reactions
Defined in
deleteReactionsEmoji()
deleteReactionsEmoji: (
channelId
,messageId
,reaction
) =>Promise
<void
>
Deletes all reactions for an emoji from a message.
Parameters
• channelId: BigString
The ID of the channel the message to delete the reactions from is in.
• messageId: BigString
The ID of the message to delete the reactions from.
• reaction: string
The reaction to remove from the message.
Returns
Promise
<void
>
Remarks
Requires the READ_MESSAGE_HISTORY
permission.
Requires the MANAGE_MESSAGES
permission.
Fires a Message Reaction Remove Emoji gateway event.
See
https://discord.com/developers/docs/resources/channel#delete-all-reactions-for-emoji
Defined in
deleteRole()
deleteRole: (
guildId
,roleId
,reason
?) =>Promise
<void
>
Deletes a role from a guild.
Parameters
• guildId: BigString
The ID of the guild to delete the role from.
• roleId: BigString
The ID of the role to delete.
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<void
>
Remarks
Requires the MANAGE_ROLES
permission.
Fires a Guild Role Delete gateway event.
See
https://discord.com/developers/docs/resources/guild#delete-guild-role
Defined in
deleteScheduledEvent()
deleteScheduledEvent: (
guildId
,eventId
) =>Promise
<void
>
Deletes a scheduled event from a guild.
Parameters
• guildId: BigString
The ID of the guild to delete the scheduled event from.
• eventId: BigString
The ID of the scheduled event to delete.
Returns
Promise
<void
>
Remarks
Requires the MANAGE_EVENTS
permission.
Fires a Guild Scheduled Event Delete gateway event.
See
https://discord.com/developers/docs/resources/guild-scheduled-event#delete-guild-scheduled-event
Defined in
deleteStageInstance()
deleteStageInstance: (
channelId
,reason
?) =>Promise
<void
>
Deletes the stage instance associated with a stage channel, if one exists.
Parameters
• channelId: BigString
The ID of the stage channel the stage instance is associated with.
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<void
>
Remarks
Requires the user to be a moderator of the stage channel.
Fires a Stage Instance Delete gateway event.
See
https://discord.com/developers/docs/resources/stage-instance#delete-stage-instance
Defined in
deleteTestEntitlement()
deleteTestEntitlement: (
applicationId
,entitlementId
) =>Promise
<void
>
Deletes a currently-active test entitlement. Discord will act as though that user or guild no longer has entitlement to your premium offering.
Parameters
• applicationId: BigString
The id of the application from where delete the entitlement
• entitlementId: BigString
The id of the entitlement to delete
Returns
Promise
<void
>
Defined in
deleteUserReaction()
deleteUserReaction: (
channelId
,messageId
,userId
,reaction
) =>Promise
<void
>
Deletes a user's reaction from a message.
Parameters
• channelId: BigString
The ID of the channel the message to delete the reaction from is in.
• messageId: BigString
The ID of the message to delete the reaction from.
• userId: BigString
The ID of the user whose reaction to delete.
• reaction: string
The reaction to delete from the message.
Returns
Promise
<void
>
Remarks
Requires the READ_MESSAGE_HISTORY
permission.
Requires the MANAGE_MESSAGES
permission.
Fires a Message Reaction Remove gateway event.
See
https://discord.com/developers/docs/resources/channel#delete-user-reaction
Defined in
deleteWebhook()
deleteWebhook: (
webhookId
,reason
?) =>Promise
<void
>
Deletes a webhook.
Parameters
• webhookId: BigString
The ID of the webhook to delete.
• reason?: string
Returns
Promise
<void
>
Remarks
Requires the MANAGE_WEBHOOKS
permission.
Fires a Webhooks Update gateway event.
See
https://discord.com/developers/docs/resources/webhook#delete-webhook
Defined in
deleteWebhookMessage()
deleteWebhookMessage: (
webhookId
,token
,messageId
,options
?) =>Promise
<void
>
Deletes a webhook message.
Parameters
• webhookId: BigString
The ID of the webhook to delete the message belonging to.
• token: string
The webhook token, used to manage the webhook.
• messageId: BigString
The ID of the message to delete.
• options?: DeleteWebhookMessageOptions
The parameters for the deletion of the message.
Returns
Promise
<void
>
Remarks
Fires a Message Delete gateway event.
See
https://discord.com/developers/docs/resources/webhook#delete-webhook
Defined in
deleteWebhookWithToken()
deleteWebhookWithToken: (
webhookId
,token
) =>Promise
<void
>
Deletes a webhook message using the webhook token, thereby bypassing the need for authentication + permissions.
Parameters
• webhookId: BigString
The ID of the webhook to delete the message belonging to.
• token: string
The webhook token, used to delete the webhook.
Returns
Promise
<void
>
Remarks
Fires a Message Delete gateway event.
See
https://discord.com/developers/docs/resources/webhook#delete-webhook-with-token
Defined in
editApplicationCommandPermissions()
editApplicationCommandPermissions: (
guildId
,commandId
,bearerToken
,options
) =>Promise
<object
>
Edits the permissions for a guild application command.
Parameters
• guildId: BigString
The ID of the guild the command is registered in.
• commandId: BigString
The ID of the command to edit the permissions of.
• bearerToken: string
The bearer token to use to make the request.
• options: object
[]
The parameters for the edit of the command permissions.
Returns
Promise
<object
>
An instance of the edited DiscordGuildApplicationCommandPermissions.
applicationId
applicationId:
string
guildId
guildId:
string
id
id:
string
permissions
permissions:
object
[]
Remarks
The bearer token requires the applications.commands.permissions.update
scope to be enabled, and to have access to the guild whose ID has been provided in the parameters.
See
Defined in
editApplicationEmoji()
editApplicationEmoji: (
id
,options
) =>Promise
<object
>
Edits an application emoji.
Parameters
• id: BigString
The ID of the emoji to edit.
• options: ModifyApplicationEmoji
The parameters for the edit of the emoji.
Returns
Promise
<object
>
An instance of the updated DiscordEmoji.
animated
animated:
undefined
|boolean
available
available:
undefined
|boolean
id
id:
undefined
|string
managed
managed:
undefined
|boolean
name
name:
undefined
|string
requireColons
requireColons:
undefined
|boolean
roles
roles:
undefined
|string
[]
user
user:
undefined
|object
See
https://discord.com/developers/docs/resources/emoji#modify-application-emoji
Defined in
editApplicationInfo()
editApplicationInfo: (
body
) =>Promise
<object
>
Edit properties of the app associated with the requesting bot user.
Parameters
• body: EditApplication
Returns
Promise
<object
>
approximateGuildCount
approximateGuildCount:
undefined
|number
approximateUserInstallCount
approximateUserInstallCount:
undefined
|number
bot
bot:
undefined
|object
botPublic
botPublic:
boolean
botRequireCodeGrant
botRequireCodeGrant:
boolean
coverImage
coverImage:
undefined
|string
customInstallUrl
customInstallUrl:
undefined
|string
description
description:
string
eventWebhooksStatus
eventWebhooksStatus:
DiscordApplicationEventWebhookStatus
eventWebhooksTypes
eventWebhooksTypes:
undefined
|DiscordWebhookEventType
[]
eventWebhooksUrl
eventWebhooksUrl:
undefined
|null
|string
flags
flags:
undefined
|ApplicationFlags
guild
guild:
undefined
|object
guildId
guildId:
undefined
|string
icon
icon:
null
|string
id
id:
string
installParams
installParams:
undefined
|object
integrationTypesConfig
integrationTypesConfig:
undefined
|object
interactionsEndpointUrl
interactionsEndpointUrl:
undefined
|null
|string
name
name:
string
owner
owner:
undefined
|object
primarySkuId
primarySkuId:
undefined
|string
privacyPolicyUrl
privacyPolicyUrl:
undefined
|string
redirectUris
redirectUris:
undefined
|string
[]
roleConnectionsVerificationUrl
roleConnectionsVerificationUrl:
undefined
|null
|string
rpcOrigins
rpcOrigins:
undefined
|string
[]
slug
slug:
undefined
|string
tags
tags:
undefined
|string
[]
team
team:
null
|object
termsOfServiceUrl
termsOfServiceUrl:
undefined
|string
verifyKey
verifyKey:
string
Remarks
Only properties that are passed will be updated.
Defined in
editAutomodRule()
editAutomodRule: (
guildId
,ruleId
,options
,reason
?) =>Promise
<object
>
Edits an automod rule.
Parameters
• guildId: BigString
The ID of the guild to edit the rule in.
• ruleId: BigString
The ID of the rule to edit.
• options: Partial
<EditAutoModerationRuleOptions
>
The parameters for the edit of the rule.
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<object
>
An instance of the edited DiscordAutoModerationRule.
actions
actions:
object
[]
creatorId
creatorId:
string
enabled
enabled:
boolean
eventType
eventType:
AutoModerationEventTypes
exemptChannels
exemptChannels:
string
[]
exemptRoles
exemptRoles:
string
[]
guildId
guildId:
string
id
id:
string
name
name:
string
triggerMetadata
triggerMetadata:
object
triggerMetadata.allowList
triggerMetadata.allowList:
undefined
|string
[]
triggerMetadata.keywordFilter
triggerMetadata.keywordFilter:
undefined
|string
[]
triggerMetadata.mentionRaidProtectionEnabled
triggerMetadata.mentionRaidProtectionEnabled:
undefined
|boolean
triggerMetadata.mentionTotalLimit
triggerMetadata.mentionTotalLimit:
undefined
|number
triggerMetadata.presets
triggerMetadata.presets:
undefined
|DiscordAutoModerationRuleTriggerMetadataPresets
[]
triggerMetadata.regexPatterns
triggerMetadata.regexPatterns:
string
[]
triggerType
triggerType:
AutoModerationTriggerTypes
Remarks
Requires the MANAGE_GUILD
permission.
Fires an Auto Moderation Rule Update gateway event.
See
https://discord.com/developers/docs/resources/auto-moderation#modify-auto-moderation-rule
Defined in
editBotMember()
editBotMember: (
guildId
,options
,reason
?) =>Promise
<object
>
Edits the nickname of the bot user.
Parameters
• guildId: BigString
The ID of the guild to edit the nickname of the bot user in.
• options: EditBotMemberOptions
The parameters for the edit of the nickname.
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<object
>
An instance of the edited DiscordMember
avatar
avatar:
undefined
|string
avatarDecorationData
avatarDecorationData:
undefined
|null
|object
banner
banner:
undefined
|string
communicationDisabledUntil
communicationDisabledUntil:
undefined
|null
|string
deaf
deaf:
undefined
|boolean
flags
flags:
number
joinedAt
joinedAt:
string
mute
mute:
undefined
|boolean
nick
nick:
undefined
|null
|string
pending
pending:
undefined
|boolean
permissions
permissions:
undefined
|string
premiumSince
premiumSince:
undefined
|null
|string
roles
roles:
string
[]
user
user:
undefined
|object
Remarks
Fires a Guild Member Update gateway event.
See
https://discord.com/developers/docs/resources/guild#modify-current-member
Defined in
editBotProfile()
editBotProfile: (
options
) =>Promise
<object
>
Modifies the bot's username, avatar or banner. NOTE: username: if changed may cause the bot's discriminator to be randomized.
Parameters
• options
• options.botAvatarURL?: null
| string
• options.botBannerURL?: null
| string
• options.username?: string
Returns
Promise
<object
>
accentColor
accentColor:
undefined
|number
avatar
avatar:
null
|string
avatarDecorationData
avatarDecorationData:
undefined
|object
banner
banner:
undefined
|string
bot
bot:
undefined
|boolean
discriminator
discriminator:
string
email
email:
undefined
|null
|string
flags
flags:
undefined
|number
globalName
globalName:
null
|string
id
id:
string
locale
locale:
undefined
|string
mfaEnabled
mfaEnabled:
undefined
|boolean
premiumType
premiumType:
undefined
|PremiumTypes
publicFlags
publicFlags:
undefined
|number
system
system:
undefined
|boolean
username
username:
string
verified
verified:
undefined
|boolean
Defined in
editChannel()
editChannel: (
channelId
,options
,reason
?) =>Promise
<object
>
Edits a channel's settings.
Parameters
• channelId: BigString
The ID of the channel to edit.
• options: ModifyChannel
The parameters for the edit of the channel.
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<object
>
An instance of the edited DiscordChannel.
applicationId
applicationId:
undefined
|string
appliedTags
appliedTags:
undefined
|string
[]
availableTags
availableTags:
undefined
|object
[]
bitrate
bitrate:
undefined
|number
defaultAutoArchiveDuration
defaultAutoArchiveDuration:
undefined
|number
defaultForumLayout
defaultForumLayout:
undefined
|ForumLayout
defaultReactionEmoji
defaultReactionEmoji:
undefined
|null
|object
defaultSortOrder
defaultSortOrder:
undefined
|null
|SortOrderTypes
defaultThreadRateLimitPerUser
defaultThreadRateLimitPerUser:
undefined
|number
flags
flags:
undefined
|ChannelFlags
guildId
guildId:
undefined
|string
icon
icon:
undefined
|string
id
id:
string
lastMessageId
lastMessageId:
undefined
|null
|string
lastPinTimestamp
lastPinTimestamp:
undefined
|null
|string
managed
managed:
undefined
|boolean
member
member:
undefined
|object
memberCount
memberCount:
undefined
|number
messageCount
messageCount:
undefined
|number
name
name:
undefined
|string
newlyCreated
newlyCreated:
undefined
|boolean
nsfw
nsfw:
undefined
|boolean
ownerId
ownerId:
undefined
|string
parentId
parentId:
undefined
|null
|string
permissionOverwrites
permissionOverwrites:
undefined
|object
[]
permissions
permissions:
undefined
|string
position
position:
undefined
|number
rateLimitPerUser
rateLimitPerUser:
undefined
|number
recipients
recipients:
undefined
|object
[]
rtcRegion
rtcRegion:
undefined
|null
|string
threadMetadata
threadMetadata:
undefined
|object
topic
topic:
undefined
|null
|string
totalMessageSent
totalMessageSent:
undefined
|number
type
type:
ChannelTypes
userLimit
userLimit:
undefined
|number
videoQualityMode
videoQualityMode:
undefined
|VideoQualityModes
Remarks
If editing a channel of type ChannelTypes.GroupDm:
- Fires a Channel Update gateway event.
If editing a thread channel:
-
Requires the
MANAGE_THREADS
permission unless if setting thearchived
property tofalse
when thelocked
property is alsofalse
, in which case only theSEND_MESSAGES
permission is required. -
Fires a Thread Update gateway event.
If editing a guild channel:
-
Requires the
MANAGE_CHANNELS
permission. -
If modifying permission overrides:
-
Requires the
MANAGE_ROLES
permission. -
Only permissions the bot user has in the guild or parent channel can be allowed/denied unless the bot user has a
MANAGE_ROLES
permission override in the channel.
-
-
If modifying a channel of type ChannelTypes.GuildCategory:
- Fires a Channel Update gateway event for each child channel impacted in this change.
-
Otherwise:
- Fires a Channel Update gateway event.
Defined in
editChannelPermissionOverrides()
editChannelPermissionOverrides: (
channelId
,options
,reason
?) =>Promise
<void
>
Edits the permission overrides for a user or role in a channel.
Parameters
• channelId: BigString
The ID of the channel to edit the permission overrides of.
• options: EditChannelPermissionOverridesOptions
The permission override.
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<void
>
Remarks
Requires the MANAGE_ROLES
permission.
Only permissions the bot user has in the guild or parent channel can be allowed/denied unless the bot user has a MANAGE_ROLES
permission override in the channel.
Fires a Channel Update gateway event.
See
https://discord.com/developers/docs/resources/channel#edit-channel-permissions
Defined in
editChannelPositions()
editChannelPositions: (
guildId
,channelPositions
) =>Promise
<void
>
Edits the positions of a set of channels in a guild.
Parameters
• guildId: BigString
The ID of the guild in which to edit the positions of the channels.
• channelPositions: ModifyGuildChannelPositions
[]
A set of objects defining the updated positions of the channels.
Returns
Promise
<void
>
Remarks
Requires the MANAGE_CHANNELS
permission.
Fires a Channel Update gateway event for every channel impacted in this change.
See
https://discord.com/developers/docs/resources/guild#modify-guild-channel-positions
Defined in
editEmoji()
editEmoji: (
guildId
,id
,options
,reason
?) =>Promise
<object
>
Edits an emoji.
Parameters
• guildId: BigString
The ID of the guild in which to edit the emoji.
• id: BigString
The ID of the emoji to edit.
• options: ModifyGuildEmoji
The parameters for the edit of the emoji.
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<object
>
An instance of the updated DiscordEmoji.
animated
animated:
undefined
|boolean
available
available:
undefined
|boolean
id
id:
undefined
|string
managed
managed:
undefined
|boolean
name
name:
undefined
|string
requireColons
requireColons:
undefined
|boolean
roles
roles:
undefined
|string
[]
user
user:
undefined
|object
Remarks
For emojis created by the current user, requires either the CREATE_GUILD_EXPRESSIONS
or MANAGE_GUILD_EXPRESSIONS
permission.
For other emojis, requires the MANAGE_GUILD_EXPRESSIONS
permission.
Fires a Guild Emojis Update
gateway event.
See
https://discord.com/developers/docs/resources/emoji#modify-guild-emoji
Defined in
editFollowupMessage()
editFollowupMessage: (
token
,messageId
,options
) =>Promise
<object
>
Edits a follow-up message to an interaction.
Parameters
• token: string
The interaction token to use, provided in the original interaction.
• messageId: BigString
The ID of the message to edit.
• options: InteractionCallbackData
The parameters for the edit of the message.
Returns
Promise
<object
>
An instance of the edited DiscordMessage.
activity
activity:
undefined
|object
application
application:
undefined
|object
applicationId
applicationId:
undefined
|string
attachments
attachments:
object
[]
author
author:
object
author.accentColor
author.accentColor:
undefined
|number
author.avatar
author.avatar:
null
|string
author.avatarDecorationData
author.avatarDecorationData:
undefined
|object
author.banner
author.banner:
undefined
|string
author.bot
author.bot:
undefined
|boolean
author.discriminator
author.discriminator:
string
author.email
author.email:
undefined
|null
|string
author.flags
author.flags:
undefined
|number
author.globalName
author.globalName:
null
|string
author.id
author.id:
string
author.locale
author.locale:
undefined
|string
author.mfaEnabled
author.mfaEnabled:
undefined
|boolean
author.premiumType
author.premiumType:
undefined
|PremiumTypes
author.publicFlags
author.publicFlags:
undefined
|number
author.system
author.system:
undefined
|boolean
author.username
author.username:
string
author.verified
author.verified:
undefined
|boolean
call
call:
undefined
|object
channelId
channelId:
string
components
components:
undefined
| (object
|object
|object
|object
)[]
content
content:
undefined
|string
editedTimestamp
editedTimestamp:
null
|string
embeds
embeds:
object
[]
flags
flags:
undefined
|MessageFlags
guildId
guildId:
undefined
|string
id
id:
string
interaction
interaction:
undefined
|object
interactionMetadata
interactionMetadata:
undefined
|object
|object
|object
member
member:
undefined
|object
mentionChannels
mentionChannels:
undefined
|object
[]
mentionEveryone
mentionEveryone:
boolean
mentionRoles
mentionRoles:
undefined
|string
[]
mentions
mentions:
object
[]
messageReference
messageReference:
undefined
|object
messageSnapshots
messageSnapshots:
undefined
|object
[]
nonce
nonce:
undefined
|string
|number
pinned
pinned:
boolean
poll
poll:
undefined
|object
position
position:
undefined
|number
reactions
reactions:
undefined
|object
[]
referencedMessage
referencedMessage:
undefined
| { id: string; channelId: string; guildId?: string | undefined; author: { username: string; globalName: string | null; locale?: string | undefined; flags?: number | undefined; premiumType?: PremiumTypes | undefined; ... 11 more ...; avatarDecorationData?: { ...; } | undefined; }; ... 31 more ...; call?: { ...; } | un...
stickerItems
stickerItems:
undefined
|object
[]
stickers
stickers:
undefined
|object
[]
thread
thread:
undefined
|object
timestamp
timestamp:
string
tts
tts:
boolean
type
type:
MessageTypes
webhookId
webhookId:
undefined
|string
Remarks
Unlike editMessage()
, this endpoint allows the bot user to act without needing to see the channel the message is in.
Does not support ephemeral follow-up messages due to these being stateless.
Fires a Message Update event.
See
https://discord.com/developers/docs/interactions/receiving-and-responding#edit-followup-message
Defined in
editGlobalApplicationCommand()
editGlobalApplicationCommand: (
commandId
,options
) =>Promise
<object
>
Edits a global application command.
Parameters
• commandId: BigString
The ID of the command to edit.
• options: CreateApplicationCommand
The parameters for the edit of the command.
Returns
Promise
<object
>
An instance of the edited DiscordApplicationCommand.
applicationId
applicationId:
string
contexts
contexts:
undefined
|null
|DiscordInteractionContextType
[]
defaultMemberPermissions
defaultMemberPermissions:
undefined
|null
|string
description
description:
undefined
|string
descriptionLocalizations
descriptionLocalizations:
undefined
|null
|object
dmPermission
dmPermission:
undefined
|boolean
guildId
guildId:
undefined
|string
handler
handler:
undefined
|DiscordInteractionEntryPointCommandHandlerType
id
id:
string
integrationTypes
integrationTypes:
undefined
|DiscordApplicationIntegrationType
[]
name
name:
string
nameLocalizations
nameLocalizations:
undefined
|null
|object
nsfw
nsfw:
undefined
|boolean
options
options:
undefined
|object
[]
type
type:
undefined
|ApplicationCommandTypes
version
version:
undefined
|string
See
Defined in
editGuild()
editGuild: (
guildId
,options
,reason
?) =>Promise
<object
>
Edits a guild's settings.
Parameters
• guildId: BigString
The ID of the guild to edit.
• options: ModifyGuild
The parameters for the edit of the guild.
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<object
>
An instance of the edited DiscordGuild.
afkChannelId
afkChannelId:
null
|string
afkTimeout
afkTimeout:
number
applicationId
applicationId:
null
|string
approximateMemberCount
approximateMemberCount:
undefined
|number
approximatePresenceCount
approximatePresenceCount:
undefined
|number
banner
banner:
null
|string
channels
channels:
undefined
|object
[]
defaultMessageNotifications
defaultMessageNotifications:
DefaultMessageNotificationLevels
description
description:
null
|string
discoverySplash
discoverySplash:
null
|string
emojis
emojis:
object
[]
explicitContentFilter
explicitContentFilter:
ExplicitContentFilterLevels
features
features:
GuildFeatures
[]
icon
icon:
null
|string
iconHash
iconHash:
undefined
|null
|string
id
id:
string
joinedAt
joinedAt:
undefined
|string
large
large:
undefined
|boolean
maxMembers
maxMembers:
undefined
|number
maxPresences
maxPresences:
undefined
|null
|number
maxStageVideoChannelUsers
maxStageVideoChannelUsers:
undefined
|number
maxVideoChannelUsers
maxVideoChannelUsers:
undefined
|number
memberCount
memberCount:
undefined
|number
members
members:
undefined
|object
[]
mfaLevel
mfaLevel:
MfaLevels
name
name:
string
nsfwLevel
nsfwLevel:
GuildNsfwLevel
owner
owner:
undefined
|boolean
ownerId
ownerId:
string
permissions
permissions:
undefined
|string
preferredLocale
preferredLocale:
string
premiumProgressBarEnabled
premiumProgressBarEnabled:
boolean
premiumSubscriptionCount
premiumSubscriptionCount:
undefined
|number
premiumTier
premiumTier:
PremiumTiers
presences
presences:
undefined
|object
[]
publicUpdatesChannelId
publicUpdatesChannelId:
null
|string
roles
roles:
object
[]
rulesChannelId
rulesChannelId:
null
|string
safetyAlertsChannelId
safetyAlertsChannelId:
null
|string
soundboardSounds
soundboardSounds:
undefined
|object
[]
splash
splash:
null
|string
stageInstances
stageInstances:
undefined
|object
[]
stickers
stickers:
undefined
|object
[]
systemChannelFlags
systemChannelFlags:
SystemChannelFlags
systemChannelId
systemChannelId:
null
|string
threads
threads:
undefined
|object
[]
unavailable
unavailable:
undefined
|boolean
vanityUrlCode
vanityUrlCode:
null
|string
verificationLevel
verificationLevel:
VerificationLevels
voiceStates
voiceStates:
undefined
|object
[]
welcomeScreen
welcomeScreen:
undefined
|object
widgetChannelId
widgetChannelId:
undefined
|null
|string
widgetEnabled
widgetEnabled:
undefined
|boolean
Remarks
Requires the MANAGE_GUILD
permission.
If attempting to add or remove the GuildFeatures.Community feature:
- Requires the
ADMINISTRATOR
permission.
Fires a Guild Update gateway event.
See
https://discord.com/developers/docs/resources/guild#modify-guild
Defined in
editGuildApplicationCommand()
editGuildApplicationCommand: (
commandId
,guildId
,options
) =>Promise
<object
>
Edits an application command registered in a guild.
Parameters
• commandId: BigString
The ID of the command to edit.
• guildId: BigString
The ID of the guild the command is registered in.
• options: CreateApplicationCommand
The parameters for the edit of the command.
Returns
Promise
<object
>
An instance of the edited DiscordApplicationCommand.
applicationId
applicationId:
string
contexts
contexts:
undefined
|null
|DiscordInteractionContextType
[]
defaultMemberPermissions
defaultMemberPermissions:
undefined
|null
|string
description
description:
undefined
|string
descriptionLocalizations
descriptionLocalizations:
undefined
|null
|object
dmPermission
dmPermission:
undefined
|boolean
guildId
guildId:
undefined
|string
handler
handler:
undefined
|DiscordInteractionEntryPointCommandHandlerType
id
id:
string
integrationTypes
integrationTypes:
undefined
|DiscordApplicationIntegrationType
[]
name
name:
string
nameLocalizations
nameLocalizations:
undefined
|null
|object
nsfw
nsfw:
undefined
|boolean
options
options:
undefined
|object
[]
type
type:
undefined
|ApplicationCommandTypes
version
version:
undefined
|string
See
https://discord.com/developers/docs/interactions/application-commands#edit-guild-application-command
Defined in
editGuildMfaLevel()
editGuildMfaLevel: (
guildId
,mfaLevel
,reason
?) =>Promise
<void
>
Modify a guild's MFA level. Requires guild ownership.
Parameters
• guildId: BigString
• mfaLevel: MfaLevels
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<void
>
Defined in
editGuildOnboarding()
editGuildOnboarding: (
guildId
,options
,reason
?) =>Promise
<object
>
Modifies the onboarding configuration of the guild.
Parameters
• guildId: BigString
The guild to get the onboarding from
• options: EditGuildOnboarding
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<object
>
defaultChannelIds
defaultChannelIds:
string
[]
enabled
enabled:
boolean
guildId
guildId:
string
mode
prompts
prompts:
object
[]
Remarks
Requires the MANAGE_GUILD
and MANAGE_ROLES
permissions.
Onboarding enforces constraints when enabled. These constraints are:
- at least 7 default channels
- at least 5 of the 7 channels must allow sending messages to the @everyone role
The mode
field modifies what is considered when enforcing these constraints.
Defined in
editGuildSticker()
editGuildSticker: (
guildId
,stickerId
,options
,reason
?) =>Promise
<object
>
Edit the given sticker.
Parameters
• guildId: BigString
The ID of the guild to get
• stickerId: BigString
• options: AtLeastOne
<EditGuildStickerOptions
>
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<object
>
available
available:
undefined
|boolean
description
description:
string
formatType
formatType:
StickerFormatTypes
guildId
guildId:
undefined
|string
id
id:
string
name
name:
string
packId
packId:
undefined
|string
sortValue
sortValue:
undefined
|number
tags
tags:
string
type
type:
StickerTypes
user
user:
undefined
|object
Remarks
For stickers created by the current user, requires either the CREATE_GUILD_EXPRESSIONS
or MANAGE_GUILD_EXPRESSIONS
permission.
For other stickers, requires the MANAGE_GUILD_EXPRESSIONS
permission.
Fires a Guild Stickers Update Gateway event.
See
https://discord.com/developers/docs/resources/sticker#modify-guild-sticker
Defined in
editGuildTemplate()
editGuildTemplate: (
guildId
,templateCode
,options
) =>Promise
<object
>
Edits a template's settings.
Parameters
• guildId: BigString
The ID of the guild to edit a template of.
• templateCode: string
The code of the template to edit.
• options: ModifyGuildTemplate
The parameters for the edit of the template.
Returns
Promise
<object
>
An instance of the edited DiscordTemplate.
code
code:
string
createdAt
createdAt:
string
creator
creator:
object
creator.accentColor
creator.accentColor:
undefined
|number
creator.avatar
creator.avatar:
null
|string
creator.avatarDecorationData
creator.avatarDecorationData:
undefined
|object
creator.banner
creator.banner:
undefined
|string
creator.bot
creator.bot:
undefined
|boolean
creator.discriminator
creator.discriminator:
string
creator.email
creator.email:
undefined
|null
|string
creator.flags
creator.flags:
undefined
|number
creator.globalName
creator.globalName:
null
|string
creator.id
creator.id:
string
creator.locale
creator.locale:
undefined
|string
creator.mfaEnabled
creator.mfaEnabled:
undefined
|boolean
creator.premiumType
creator.premiumType:
undefined
|PremiumTypes
creator.publicFlags
creator.publicFlags:
undefined
|number
creator.system
creator.system:
undefined
|boolean
creator.username
creator.username:
string
creator.verified
creator.verified:
undefined
|boolean
creatorId
creatorId:
string
description
description:
null
|string
isDirty
isDirty:
null
|boolean
name
name:
string
serializedSourceGuild
serializedSourceGuild:
object
serializedSourceGuild.afkChannelId
serializedSourceGuild.afkChannelId:
null
|number
serializedSourceGuild.afkTimeout
serializedSourceGuild.afkTimeout:
number
serializedSourceGuild.applicationId
serializedSourceGuild.applicationId:
undefined
|null
|string
serializedSourceGuild.approximateMemberCount
serializedSourceGuild.approximateMemberCount:
undefined
|number
serializedSourceGuild.approximatePresenceCount
serializedSourceGuild.approximatePresenceCount:
undefined
|number
serializedSourceGuild.banner
serializedSourceGuild.banner:
undefined
|null
|string
serializedSourceGuild.channels
serializedSourceGuild.channels:
object
[]
serializedSourceGuild.defaultMessageNotifications
serializedSourceGuild.defaultMessageNotifications:
DefaultMessageNotificationLevels
serializedSourceGuild.description
serializedSourceGuild.description:
null
|string
serializedSourceGuild.discoverySplash
serializedSourceGuild.discoverySplash:
undefined
|null
|string
serializedSourceGuild.emojis
serializedSourceGuild.emojis:
undefined
|object
[]
serializedSourceGuild.explicitContentFilter
serializedSourceGuild.explicitContentFilter:
ExplicitContentFilterLevels
serializedSourceGuild.features
serializedSourceGuild.features:
undefined
|GuildFeatures
[]
serializedSourceGuild.icon
serializedSourceGuild.icon:
undefined
|null
|string
serializedSourceGuild.iconHash
serializedSourceGuild.iconHash:
undefined
|null
|string
serializedSourceGuild.id
serializedSourceGuild.id:
undefined
|string
serializedSourceGuild.joinedAt
serializedSourceGuild.joinedAt:
undefined
|string
serializedSourceGuild.large
serializedSourceGuild.large:
undefined
|boolean
serializedSourceGuild.maxMembers
serializedSourceGuild.maxMembers:
undefined
|number
serializedSourceGuild.maxPresences
serializedSourceGuild.maxPresences:
undefined
|null
|number
serializedSourceGuild.maxStageVideoChannelUsers
serializedSourceGuild.maxStageVideoChannelUsers:
undefined
|number
serializedSourceGuild.maxVideoChannelUsers
serializedSourceGuild.maxVideoChannelUsers:
undefined
|number
serializedSourceGuild.memberCount
serializedSourceGuild.memberCount:
undefined
|number
serializedSourceGuild.members
serializedSourceGuild.members:
undefined
|object
[]
serializedSourceGuild.mfaLevel
serializedSourceGuild.mfaLevel:
undefined
|MfaLevels
serializedSourceGuild.name
serializedSourceGuild.name:
string
serializedSourceGuild.nsfwLevel
serializedSourceGuild.nsfwLevel:
undefined
|GuildNsfwLevel
serializedSourceGuild.owner
serializedSourceGuild.owner:
undefined
|boolean
serializedSourceGuild.ownerId
serializedSourceGuild.ownerId:
undefined
|string
serializedSourceGuild.permissions
serializedSourceGuild.permissions:
undefined
|string
serializedSourceGuild.preferredLocale
serializedSourceGuild.preferredLocale:
string
serializedSourceGuild.premiumProgressBarEnabled
serializedSourceGuild.premiumProgressBarEnabled:
undefined
|boolean
serializedSourceGuild.premiumSubscriptionCount
serializedSourceGuild.premiumSubscriptionCount:
undefined
|number
serializedSourceGuild.premiumTier
serializedSourceGuild.premiumTier:
undefined
|PremiumTiers
serializedSourceGuild.presences
serializedSourceGuild.presences:
undefined
|object
[]
serializedSourceGuild.publicUpdatesChannelId
serializedSourceGuild.publicUpdatesChannelId:
undefined
|null
|string
serializedSourceGuild.roles
serializedSourceGuild.roles:
object
[]
serializedSourceGuild.rulesChannelId
serializedSourceGuild.rulesChannelId:
undefined
|null
|string
serializedSourceGuild.safetyAlertsChannelId
serializedSourceGuild.safetyAlertsChannelId:
undefined
|null
|string
serializedSourceGuild.soundboardSounds
serializedSourceGuild.soundboardSounds:
undefined
|object
[]
serializedSourceGuild.splash
serializedSourceGuild.splash:
undefined
|null
|string
serializedSourceGuild.stageInstances
serializedSourceGuild.stageInstances:
undefined
|object
[]
serializedSourceGuild.stickers
serializedSourceGuild.stickers:
undefined
|object
[]
serializedSourceGuild.systemChannelFlags
serializedSourceGuild.systemChannelFlags:
SystemChannelFlags
serializedSourceGuild.systemChannelId
serializedSourceGuild.systemChannelId:
null
|number
serializedSourceGuild.threads
serializedSourceGuild.threads:
undefined
|object
[]
serializedSourceGuild.unavailable
serializedSourceGuild.unavailable:
undefined
|boolean
serializedSourceGuild.vanityUrlCode
serializedSourceGuild.vanityUrlCode:
undefined
|null
|string
serializedSourceGuild.verificationLevel
serializedSourceGuild.verificationLevel:
VerificationLevels
serializedSourceGuild.voiceStates
serializedSourceGuild.voiceStates:
undefined
|object
[]
serializedSourceGuild.welcomeScreen
serializedSourceGuild.welcomeScreen:
undefined
|object
serializedSourceGuild.widgetChannelId
serializedSourceGuild.widgetChannelId:
undefined
|null
|string
serializedSourceGuild.widgetEnabled
serializedSourceGuild.widgetEnabled:
undefined
|boolean
sourceGuildId
sourceGuildId:
string
updatedAt
updatedAt:
string
usageCount
usageCount:
number
Remarks
Requires the MANAGE_GUILD
permission.
Fires a Guild Update gateway event.
See
https://discord.com/developers/docs/resources/guild-template#modify-guild-template
Defined in
editMember()
editMember: (
guildId
,userId
,options
,reason
?) =>Promise
<object
>
Edits a member's properties.
Parameters
• guildId: BigString
The ID of the guild to edit the member of.
• userId: BigString
The user ID of the member to edit.
• options: ModifyGuildMember
The parameters for the edit of the user.
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<object
>
avatar
avatar:
undefined
|string
avatarDecorationData
avatarDecorationData:
undefined
|null
|object
banner
banner:
undefined
|string
communicationDisabledUntil
communicationDisabledUntil:
undefined
|null
|string
deaf
deaf:
undefined
|boolean
flags
flags:
number
joinedAt
joinedAt:
string
mute
mute:
undefined
|boolean
nick
nick:
undefined
|null
|string
pending
pending:
undefined
|boolean
permissions
permissions:
undefined
|string
premiumSince
premiumSince:
undefined
|null
|string
roles
roles:
string
[]
user
user:
undefined
|object
Remarks
This endpoint requires various permissions depending on what is edited about the member. To find out the required permission to enact a change, read the documentation of this endpoint's parameters.
Fires a Guild Member Update gateway event.
See
https://discord.com/developers/docs/resources/guild#modify-guild-member
Defined in
editMessage()
editMessage: (
channelId
,messageId
,options
) =>Promise
<object
>
Edits a message.
Parameters
• channelId: BigString
The ID of the channel to edit the message in.
• messageId: BigString
The IDs of the message to edit.
• options: EditMessage
The parameters for the edit of the message.
Returns
Promise
<object
>
An instance of the edited DiscordMessage.
activity
activity:
undefined
|object
application
application:
undefined
|object
applicationId
applicationId:
undefined
|string
attachments
attachments:
object
[]
author
author:
object
author.accentColor
author.accentColor:
undefined
|number
author.avatar
author.avatar:
null
|string
author.avatarDecorationData
author.avatarDecorationData:
undefined
|object
author.banner
author.banner:
undefined
|string
author.bot
author.bot:
undefined
|boolean
author.discriminator
author.discriminator:
string
author.email
author.email:
undefined
|null
|string
author.flags
author.flags:
undefined
|number
author.globalName
author.globalName:
null
|string
author.id
author.id:
string
author.locale
author.locale:
undefined
|string
author.mfaEnabled
author.mfaEnabled:
undefined
|boolean
author.premiumType
author.premiumType:
undefined
|PremiumTypes
author.publicFlags
author.publicFlags:
undefined
|number
author.system
author.system:
undefined
|boolean
author.username
author.username:
string
author.verified
author.verified:
undefined
|boolean
call
call:
undefined
|object
channelId
channelId:
string
components
components:
undefined
| (object
|object
|object
|object
)[]
content
content:
undefined
|string
editedTimestamp
editedTimestamp:
null
|string
embeds
embeds:
object
[]
flags
flags:
undefined
|MessageFlags
guildId
guildId:
undefined
|string
id
id:
string
interaction
interaction:
undefined
|object
interactionMetadata
interactionMetadata:
undefined
|object
|object
|object
member
member:
undefined
|object
mentionChannels
mentionChannels:
undefined
|object
[]
mentionEveryone
mentionEveryone:
boolean
mentionRoles
mentionRoles:
undefined
|string
[]
mentions
mentions:
object
[]
messageReference
messageReference:
undefined
|object
messageSnapshots
messageSnapshots:
undefined
|object
[]
nonce
nonce:
undefined
|string
|number
pinned
pinned:
boolean
poll
poll:
undefined
|object
position
position:
undefined
|number
reactions
reactions:
undefined
|object
[]
referencedMessage
referencedMessage:
undefined
| { id: string; channelId: string; guildId?: string | undefined; author: { username: string; globalName: string | null; locale?: string | undefined; flags?: number | undefined; premiumType?: PremiumTypes | undefined; ... 11 more ...; avatarDecorationData?: { ...; } | undefined; }; ... 31 more ...; call?: { ...; } | un...
stickerItems
stickerItems:
undefined
|object
[]
stickers
stickers:
undefined
|object
[]
thread
thread:
undefined
|object
timestamp
timestamp:
string
tts
tts:
boolean
type
type:
MessageTypes
webhookId
webhookId:
undefined
|string
Remarks
If editing another user's message:
- Requires the
MANAGE_MESSAGES
permission. - Only the flags property of the options object parameter can be edited.
Fires a Message Update gateway event.
See
https://discord.com/developers/docs/resources/channel#edit-message
Defined in
editOriginalInteractionResponse()
editOriginalInteractionResponse: (
token
,options
) =>Promise
<object
>
Edits the initial message response to an interaction.
Parameters
• token: string
The interaction token to use, provided in the original interaction.
• options: InteractionCallbackData
The parameters for the edit of the response.
Returns
Promise
<object
>
An instance of the edited DiscordMessage.
activity
activity:
undefined
|object
application
application:
undefined
|object
applicationId
applicationId:
undefined
|string
attachments
attachments:
object
[]
author
author:
object
author.accentColor
author.accentColor:
undefined
|number
author.avatar
author.avatar:
null
|string
author.avatarDecorationData
author.avatarDecorationData:
undefined
|object
author.banner
author.banner:
undefined
|string
author.bot
author.bot:
undefined
|boolean
author.discriminator
author.discriminator:
string
author.email
author.email:
undefined
|null
|string
author.flags
author.flags:
undefined
|number
author.globalName
author.globalName:
null
|string
author.id
author.id:
string
author.locale
author.locale:
undefined
|string
author.mfaEnabled
author.mfaEnabled:
undefined
|boolean
author.premiumType
author.premiumType:
undefined
|PremiumTypes
author.publicFlags
author.publicFlags:
undefined
|number
author.system
author.system:
undefined
|boolean
author.username
author.username:
string
author.verified
author.verified:
undefined
|boolean
call
call:
undefined
|object
channelId
channelId:
string
components
components:
undefined
| (object
|object
|object
|object
)[]
content
content:
undefined
|string
editedTimestamp
editedTimestamp:
null
|string
embeds
embeds:
object
[]
flags
flags:
undefined
|MessageFlags
guildId
guildId:
undefined
|string
id
id:
string
interaction
interaction:
undefined
|object
interactionMetadata
interactionMetadata:
undefined
|object
|object
|object
member
member:
undefined
|object
mentionChannels
mentionChannels:
undefined
|object
[]
mentionEveryone
mentionEveryone:
boolean
mentionRoles
mentionRoles:
undefined
|string
[]
mentions
mentions:
object
[]
messageReference
messageReference:
undefined
|object
messageSnapshots
messageSnapshots:
undefined
|object
[]
nonce
nonce:
undefined
|string
|number
pinned
pinned:
boolean
poll
poll:
undefined
|object
position
position:
undefined
|number
reactions
reactions:
undefined
|object
[]
referencedMessage
referencedMessage:
undefined
| { id: string; channelId: string; guildId?: string | undefined; author: { username: string; globalName: string | null; locale?: string | undefined; flags?: number | undefined; premiumType?: PremiumTypes | undefined; ... 11 more ...; avatarDecorationData?: { ...; } | undefined; }; ... 31 more ...; call?: { ...; } | un...
stickerItems
stickerItems:
undefined
|object
[]
stickers
stickers:
undefined
|object
[]
thread
thread:
undefined
|object
timestamp
timestamp:
string
tts
tts:
boolean
type
type:
MessageTypes
webhookId
webhookId:
undefined
|string
Remarks
Unlike editMessage()
, this endpoint allows the bot user to act without needing to see the channel the message is in.
Does not support ephemeral follow-up messages due to these being stateless.
Fires a Message Update event.
See
Defined in
editOriginalWebhookMessage()
editOriginalWebhookMessage: (
webhookId
,token
,options
) =>Promise
<object
>
Edits the original webhook message.
Parameters
• webhookId: BigString
The ID of the webhook to edit the original message of.
• token: string
The webhook token, used to edit the message.
• options: InteractionCallbackData
& object
The parameters for the edit of the message.
Returns
Promise
<object
>
An instance of the edited DiscordMessage.
activity
activity:
undefined
|object
application
application:
undefined
|object
applicationId
applicationId:
undefined
|string
attachments
attachments:
object
[]
author
author:
object
author.accentColor
author.accentColor:
undefined
|number
author.avatar
author.avatar:
null
|string
author.avatarDecorationData
author.avatarDecorationData:
undefined
|object
author.banner
author.banner:
undefined
|string
author.bot
author.bot:
undefined
|boolean
author.discriminator
author.discriminator:
string
author.email
author.email:
undefined
|null
|string
author.flags
author.flags:
undefined
|number
author.globalName
author.globalName:
null
|string
author.id
author.id:
string
author.locale
author.locale:
undefined
|string
author.mfaEnabled
author.mfaEnabled:
undefined
|boolean
author.premiumType
author.premiumType:
undefined
|PremiumTypes
author.publicFlags
author.publicFlags:
undefined
|number
author.system
author.system:
undefined
|boolean
author.username
author.username:
string
author.verified
author.verified:
undefined
|boolean
call
call:
undefined
|object
channelId
channelId:
string
components
components:
undefined
| (object
|object
|object
|object
)[]
content
content:
undefined
|string
editedTimestamp
editedTimestamp:
null
|string
embeds
embeds:
object
[]
flags
flags:
undefined
|MessageFlags
guildId
guildId:
undefined
|string
id
id:
string
interaction
interaction:
undefined
|object
interactionMetadata
interactionMetadata:
undefined
|object
|object
|object
member
member:
undefined
|object
mentionChannels
mentionChannels:
undefined
|object
[]
mentionEveryone
mentionEveryone:
boolean
mentionRoles
mentionRoles:
undefined
|string
[]
mentions
mentions:
object
[]
messageReference
messageReference:
undefined
|object
messageSnapshots
messageSnapshots:
undefined
|object
[]
nonce
nonce:
undefined
|string
|number
pinned
pinned:
boolean
poll
poll:
undefined
|object
position
position:
undefined
|number
reactions
reactions:
undefined
|object
[]
referencedMessage
referencedMessage:
undefined
| { id: string; channelId: string; guildId?: string | undefined; author: { username: string; globalName: string | null; locale?: string | undefined; flags?: number | undefined; premiumType?: PremiumTypes | undefined; ... 11 more ...; avatarDecorationData?: { ...; } | undefined; }; ... 31 more ...; call?: { ...; } | un...
stickerItems
stickerItems:
undefined
|object
[]
stickers
stickers:
undefined
|object
[]
thread
thread:
undefined
|object
timestamp
timestamp:
string
tts
tts:
boolean
type
type:
MessageTypes
webhookId
webhookId:
undefined
|string
Remarks
Fires a Message Update gateway event.
See
https://discord.com/developers/docs/resources/webhook#edit-webhook-message
Defined in
editOwnVoiceState()
editOwnVoiceState: (
guildId
,options
) =>Promise
<void
>
Edits the voice state of the bot user.
Parameters
• guildId: BigString
The ID of the guild in which to edit the voice state of the bot user.
• options: EditOwnVoiceState
The parameters for the edit of the voice state.
Returns
Promise
<void
>
Remarks
The channelId property of the options object parameter must point to a stage channel, and the bot user must already have joined it.
If attempting to unmute oneself:
- Requires the
MUTE_MEMBERS
permission.
If attempting to request to speak:
- Requires the
REQUEST_TO_SPEAK
permission.
See
https://discord.com/developers/docs/resources/voice#modify-current-user-voice-state
Defined in
editRole()
editRole: (
guildId
,roleId
,options
,reason
?) =>Promise
<object
>
Edits a role in a guild.
Parameters
• guildId: BigString
The ID of the guild to edit the role in.
• roleId: BigString
The ID of the role to edit.
• options: EditGuildRole
The parameters for the edit of the role.
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<object
>
An instance of the edited DiscordRole.
color
color:
number
flags
flags:
RoleFlags
hoist
hoist:
boolean
icon
icon:
undefined
|string
id
id:
string
managed
managed:
boolean
mentionable
mentionable:
boolean
name
name:
string
permissions
permissions:
string
position
position:
number
tags
tags:
undefined
|object
unicodeEmoji
unicodeEmoji:
undefined
|string
Remarks
Requires the MANAGE_ROLES
permission.
Fires a Guild Role Update gateway event.
See
https://discord.com/developers/docs/resources/guild#modify-guild-role
Defined in
editRolePositions()
editRolePositions: (
guildId
,options
,reason
?) =>Promise
<object
[]>
Edits the positions of a set of roles.
Parameters
• guildId: BigString
The ID of the guild to edit the role positions in.
• options: ModifyRolePositions
[]
The parameters for the edit of the role positions.
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<object
[]>
A collection of DiscordRole objects assorted by role ID.
Remarks
Requires the MANAGE_ROLES
permission.
Fires a Guild Role Update gateway event for every role impacted in this change.
See
https://discord.com/developers/docs/resources/guild#modify-guild-role-positions
Defined in
editScheduledEvent()
editScheduledEvent: (
guildId
,eventId
,options
,reason
?) =>Promise
<object
>
Edits a scheduled event.
Parameters
• guildId: BigString
The ID of the guild to edit the scheduled event in.
• eventId: BigString
The ID of the scheduled event to edit.
• options: Partial
<EditScheduledEvent
>
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<object
>
An instance of the edited DiscordScheduledEvent.
channelId
channelId:
null
|string
creator
creator:
undefined
|object
creatorId
creatorId:
undefined
|null
|string
description
description:
undefined
|string
entityId
entityId:
null
|string
entityMetadata
entityMetadata:
null
|object
entityType
entityType:
ScheduledEventEntityType
guildId
guildId:
string
id
id:
string
image
image:
undefined
|null
|string
name
name:
string
privacyLevel
privacyLevel:
GuildOnly
recurrenceRule
recurrenceRule:
null
|object
scheduledEndTime
scheduledEndTime:
null
|string
scheduledStartTime
scheduledStartTime:
string
status
status:
ScheduledEventStatus
userCount
userCount:
undefined
|number
Remarks
Requires the MANAGE_EVENTS
permission.
To start or end an event, modify the event's status
property.
The entity_metadata
property is discarded for events whose entity_type
is not ScheduledEventEntityType.External.
Fires a Guild Scheduled Event Update gateway event.
See
https://discord.com/developers/docs/resources/guild-scheduled-event#modify-guild-scheduled-event
Defined in
editStageInstance()
editStageInstance: (
channelId
,topic
,reason
?) =>Promise
<object
>
Edits a stage instance.
Parameters
• channelId: BigString
The ID of the stage channel the stage instance is associated with.
• topic: string
Topic of the Stage instance (1-120 characters).
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<object
>
An instance of the updated DiscordStageInstance.
channelId
channelId:
string
guildId
guildId:
string
guildScheduledEventId
guildScheduledEventId:
undefined
|string
id
id:
string
topic
topic:
string
Remarks
Requires the user to be a moderator of the stage channel.
Fires a Stage Instance Update event.
See
https://discord.com/developers/docs/resources/stage-instance#modify-stage-instance
Defined in
editUserApplicationRoleConnection()
editUserApplicationRoleConnection: (
bearerToken
,applicationId
,options
) =>Promise
<object
>
Edit the current user application role connection for the application.
Parameters
• bearerToken: string
The access token of the user
• applicationId: BigString
The id of the application to edit the role connection
• options
The options to edit
• options.metadata
• options.platformName: null
| string
• options.platformUsername: null
| string
Returns
Promise
<object
>
metadata
metadata:
object
platformName
platformName:
null
|string
platformUsername
platformUsername:
null
|string
Remarks
This requires the role_connections.write
scope.
See
https://discord.com/developers/docs/resources/user#update-user-application-role-connection
Defined in
editUserVoiceState()
editUserVoiceState: (
guildId
,options
) =>Promise
<void
>
Edits the voice state of another user.
Parameters
• guildId: BigString
The ID of the guild in which to edit the voice state of the bot user.
• options: EditUserVoiceState
The parameters for the edit of the voice state.
Returns
Promise
<void
>
Remarks
The channelId property of the options object parameter must point to a stage channel, and the user must already have joined it.
Requires the MUTE_MEMBERS
permission.
See
https://discord.com/developers/docs/resources/voice#modify-user-voice-state
Defined in
editWebhook()
editWebhook: (
webhookId
,options
,reason
?) =>Promise
<Camelize
<DiscordWebhook
>>
Edits a webhook.
Parameters
• webhookId: BigString
The ID of the webhook to edit.
• options: ModifyWebhook
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<Camelize
<DiscordWebhook
>>
An instance of the edited DiscordWebhook.
Remarks
Requires the MANAGE_WEBHOOKS
permission.
Fires a Webhooks Update gateway event.
See
https://discord.com/developers/docs/resources/webhook#edit-webhook
Defined in
editWebhookMessage()
editWebhookMessage: (
webhookId
,token
,messageId
,options
) =>Promise
<object
>
Edits a webhook message.
Parameters
• webhookId: BigString
The ID of the webhook to edit the message of.
• token: string
The webhook token, used to edit the message.
• messageId: BigString
The ID of the message to edit.
• options: InteractionCallbackData
& object
The parameters for the edit of the message.
Returns
Promise
<object
>
An instance of the edited DiscordMessage.
activity
activity:
undefined
|object
application
application:
undefined
|object
applicationId
applicationId:
undefined
|string
attachments
attachments:
object
[]
author
author:
object
author.accentColor
author.accentColor:
undefined
|number
author.avatar
author.avatar:
null
|string
author.avatarDecorationData
author.avatarDecorationData:
undefined
|object
author.banner
author.banner:
undefined
|string
author.bot
author.bot:
undefined
|boolean
author.discriminator
author.discriminator:
string
author.email
author.email:
undefined
|null
|string
author.flags
author.flags:
undefined
|number
author.globalName
author.globalName:
null
|string
author.id
author.id:
string
author.locale
author.locale:
undefined
|string
author.mfaEnabled
author.mfaEnabled:
undefined
|boolean
author.premiumType
author.premiumType:
undefined
|PremiumTypes
author.publicFlags
author.publicFlags:
undefined
|number
author.system
author.system:
undefined
|boolean
author.username
author.username:
string
author.verified
author.verified:
undefined
|boolean
call
call:
undefined
|object
channelId
channelId:
string
components
components:
undefined
| (object
|object
|object
|object
)[]
content
content:
undefined
|string
editedTimestamp
editedTimestamp:
null
|string
embeds
embeds:
object
[]
flags
flags:
undefined
|MessageFlags
guildId
guildId:
undefined
|string
id
id:
string
interaction
interaction:
undefined
|object
interactionMetadata
interactionMetadata:
undefined
|object
|object
|object
member
member:
undefined
|object
mentionChannels
mentionChannels:
undefined
|object
[]
mentionEveryone
mentionEveryone:
boolean
mentionRoles
mentionRoles:
undefined
|string
[]
mentions
mentions:
object
[]
messageReference
messageReference:
undefined
|object
messageSnapshots
messageSnapshots:
undefined
|object
[]
nonce
nonce:
undefined
|string
|number
pinned
pinned:
boolean
poll
poll:
undefined
|object
position
position:
undefined
|number
reactions
reactions:
undefined
|object
[]
referencedMessage
referencedMessage:
undefined
| { id: string; channelId: string; guildId?: string | undefined; author: { username: string; globalName: string | null; locale?: string | undefined; flags?: number | undefined; premiumType?: PremiumTypes | undefined; ... 11 more ...; avatarDecorationData?: { ...; } | undefined; }; ... 31 more ...; call?: { ...; } | un...
stickerItems
stickerItems:
undefined
|object
[]
stickers
stickers:
undefined
|object
[]
thread
thread:
undefined
|object
timestamp
timestamp:
string
tts
tts:
boolean
type
type:
MessageTypes
webhookId
webhookId:
undefined
|string
Remarks
Fires a Message Update gateway event.
See
https://discord.com/developers/docs/resources/webhook#edit-webhook-message
Defined in
editWebhookWithToken()
editWebhookWithToken: (
webhookId
,token
,options
) =>Promise
<Camelize
<DiscordWebhook
>>
Edits a webhook using the webhook token, thereby bypassing the need for authentication + permissions.
Parameters
• webhookId: BigString
The ID of the webhook to edit.
• token: string
The webhook token, used to edit the webhook.
• options: Omit
<ModifyWebhook
, "channelId"
>
Returns
Promise
<Camelize
<DiscordWebhook
>>
An instance of the edited DiscordWebhook.
Remarks
Requires the MANAGE_WEBHOOKS
permission.
Fires a Webhooks Update gateway event.
See
https://discord.com/developers/docs/resources/webhook#modify-webhook-with-token
Defined in
editWelcomeScreen()
editWelcomeScreen: (
guildId
,options
,reason
?) =>Promise
<object
>
Edits a guild's welcome screen.
Parameters
• guildId: BigString
The ID of the guild to edit the welcome screen of.
• options
The parameters for the edit of the welcome screen.
• options.description: undefined
| null
| string
• options.enabled?: undefined
| null
| boolean
• options.welcomeScreen?: undefined
| null
| object
[]
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<object
>
An instance of the edited DiscordWelcomeScreen.
description
description:
null
|string
welcomeChannels
welcomeChannels:
object
[]
Remarks
Requires the MANAGE_GUILD
permission.
Fires a Guild Update gateway event.
See
https://discord.com/developers/docs/resources/guild#modify-guild-welcome-screen
Defined in
editWidgetSettings()
editWidgetSettings: (
guildId
,options
,reason
?) =>Promise
<object
>
Edits the settings of a guild's widget.
Parameters
• guildId: BigString
The ID of the guild to edit the settings of the widget of.
• options
• options.channelId: null
| string
• options.enabled?: boolean
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<object
>
An instance of the edited DiscordGuildWidgetSettings.
channelId
channelId:
null
|string
enabled
enabled:
boolean
Remarks
Requires the MANAGE_GUILD
permission.
Fires a Guild Update gateway event.
See
https://discord.com/developers/docs/resources/guild#modify-guild-widget
Defined in
endPoll()
endPoll: (
channelId
,messageId
) =>Promise
<object
>
Immediately ends the poll.
Parameters
• channelId: BigString
The ID of the channel in which the message with the poll lives
• messageId: BigString
The ID of the message in which the poll lives
Returns
Promise
<object
>
The message with the expired poll
activity
activity:
undefined
|object
application
application:
undefined
|object
applicationId
applicationId:
undefined
|string
attachments
attachments:
object
[]
author
author:
object
author.accentColor
author.accentColor:
undefined
|number
author.avatar
author.avatar:
null
|string
author.avatarDecorationData
author.avatarDecorationData:
undefined
|object
author.banner
author.banner:
undefined
|string
author.bot
author.bot:
undefined
|boolean
author.discriminator
author.discriminator:
string
author.email
author.email:
undefined
|null
|string
author.flags
author.flags:
undefined
|number
author.globalName
author.globalName:
null
|string
author.id
author.id:
string
author.locale
author.locale:
undefined
|string
author.mfaEnabled
author.mfaEnabled:
undefined
|boolean
author.premiumType
author.premiumType:
undefined
|PremiumTypes
author.publicFlags
author.publicFlags:
undefined
|number
author.system
author.system:
undefined
|boolean
author.username
author.username:
string
author.verified
author.verified:
undefined
|boolean
call
call:
undefined
|object
channelId
channelId:
string
components
components:
undefined
| (object
|object
|object
|object
)[]
content
content:
undefined
|string
editedTimestamp
editedTimestamp:
null
|string
embeds
embeds:
object
[]
flags
flags:
undefined
|MessageFlags
guildId
guildId:
undefined
|string
id
id:
string
interaction
interaction:
undefined
|object
interactionMetadata
interactionMetadata:
undefined
|object
|object
|object
member
member:
undefined
|object
mentionChannels
mentionChannels:
undefined
|object
[]
mentionEveryone
mentionEveryone:
boolean
mentionRoles
mentionRoles:
undefined
|string
[]
mentions
mentions:
object
[]
messageReference
messageReference:
undefined
|object
messageSnapshots
messageSnapshots:
undefined
|object
[]
nonce
nonce:
undefined
|string
|number
pinned
pinned:
boolean
poll
poll:
undefined
|object
position
position:
undefined
|number
reactions
reactions:
undefined
|object
[]
referencedMessage
referencedMessage:
undefined
| { id: string; channelId: string; guildId?: string | undefined; author: { username: string; globalName: string | null; locale?: string | undefined; flags?: number | undefined; premiumType?: PremiumTypes | undefined; ... 11 more ...; avatarDecorationData?: { ...; } | undefined; }; ... 31 more ...; call?: { ...; } | un...
stickerItems
stickerItems:
undefined
|object
[]
stickers
stickers:
undefined
|object
[]
thread
thread:
undefined
|object
timestamp
timestamp:
string
tts
tts:
boolean
type
type:
MessageTypes
webhookId
webhookId:
undefined
|string
Remarks
You cannot end polls from other users.
Fires a Message Update gateway event
Defined in
exchangeToken()
exchangeToken: (
clientId
,clientSecret
,options
) =>Promise
<object
>
Exchange the information to get a OAuth2 accessToken token
Parameters
• clientId: BigString
Application's client id
• clientSecret: string
application's client secret
• options: Camelize
<DiscordTokenExchange
>
The options to make the exchange with discord
Returns
Promise
<object
>
accessToken
accessToken:
string
expiresIn
expiresIn:
number
guild
guild:
undefined
|object
refreshToken
refreshToken:
string
scope
scope:
string
tokenType
tokenType:
string
webhook
webhook:
undefined
|object
Defined in
executeWebhook()
executeWebhook: (
webhookId
,token
,options
) =>Promise
<undefined
|object
>
Executes a webhook, causing a message to be posted in the channel configured for the webhook.
Parameters
• webhookId: BigString
The ID of the webhook to execute.
• token: string
The webhook token, used to execute the webhook.
• options: ExecuteWebhook
The parameters for the execution of the webhook.
Returns
Promise
<undefined
| object
>
An instance of the created DiscordMessage, or undefined
if the wait property of the options object parameter is set to false
.
Remarks
If the webhook channel is a forum channel, you must provide a value for either threadId
or threadName
.
See
https://discord.com/developers/docs/resources/webhook#execute-webhook
Defined in
followAnnouncement()
followAnnouncement: (
sourceChannelId
,targetChannelId
,reason
?) =>Promise
<object
>
Follows an announcement channel, allowing messages posted within it to be cross-posted into the target channel.
Parameters
• sourceChannelId: BigString
The ID of the announcement channel to follow.
• targetChannelId: BigString
The ID of the target channel - the channel to cross-post to.
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<object
>
An instance of DiscordFollowedChannel.
channelId
channelId:
string
webhookId
webhookId:
string
Remarks
Requires the MANAGE_WEBHOOKS
permission in the target channel.
Fires a Webhooks Update gateway event.
See
https://discord.com/developers/docs/resources/channel#follow-announcement-channel
Defined in
get()
get: <
T
>(url
,options
?) =>Promise
<Camelize
<T
>>
Make a get request to the api
Type Parameters
• T = void
Parameters
• url: string
• options?: Omit
<MakeRequestOptions
, "body"
>
Returns
Promise
<Camelize
<T
>>
Defined in
getActiveThreads()
getActiveThreads: (
guildId
) =>Promise
<object
>
Gets the list of all active threads for a guild.
Parameters
• guildId: BigString
The ID of the guild to get the threads of.
Returns
Promise
<object
>
An instance of DiscordActiveThreads.
members
members:
object
[]
threads
threads:
object
[]
Remarks
Returns both public and private threads.
Threads are ordered by the id
property in descending order.
See
https://discord.com/developers/docs/resources/guild#list-active-guild-threads
Defined in
getApplicationActivityInstance()
getApplicationActivityInstance: (
applicationId
,instanceId
) =>Promise
<object
>
Returns a serialized activity instance, if it exists. Useful for preventing unwanted activity sessions.
Parameters
• applicationId: BigString
The ID of the application
• instanceId: string
The ID of the activity instance
Returns
Promise
<object
>
applicationId
applicationId:
string
instanceId
instanceId:
string
launchId
launchId:
string
location
location:
object
location.channelId
location.channelId:
string
location.guildId
location.guildId:
undefined
|null
|string
location.id
location.id:
string
location.kind
location.kind:
DiscordActivityLocationKind
users
users:
string
[]
Defined in
getApplicationCommandPermission()
getApplicationCommandPermission: (
guildId
,commandId
,options
?) =>Promise
<object
>
Gets the permissions of a guild application command.
Parameters
• guildId: BigString
The ID of the guild the command is registered in.
• commandId: BigString
The ID of the command to get the permissions of.
• options?: GetApplicationCommandPermissionOptions
The OAuth2 related optional parameters for the endpoint
Returns
Promise
<object
>
An instance of DiscordGuildApplicationCommandPermissions.
applicationId
applicationId:
string
guildId
guildId:
string
id
id:
string
permissions
permissions:
object
[]
Remarks
Then specifying the options object the access token passed-in requires the OAuth2 scope applications.commands.permissions.update
See
Defined in
getApplicationCommandPermissions()
getApplicationCommandPermissions: (
guildId
,options
?) =>Promise
<object
[]>
Gets the permissions of all application commands registered in a guild by the ID of the guild and optionally an external application.
Parameters
• guildId: BigString
The ID of the guild to get the permissions objects of.
• options?: GetApplicationCommandPermissionOptions
The OAuth2 related optional parameters for the endpoint
Returns
Promise
<object
[]>
A collection of DiscordGuildApplicationCommandPermissions objects assorted by command ID.
Remarks
Then specifying the options object the access token passed-in requires the OAuth2 scope applications.commands.permissions.update
See
Defined in
getApplicationEmoji()
getApplicationEmoji: (
emojiId
) =>Promise
<object
>
Gets an application emoji by its ID.
Parameters
• emojiId: BigString
The ID of the emoji to get.
Returns
Promise
<object
>
An instance of DiscordEmoji.
animated
animated:
undefined
|boolean
available
available:
undefined
|boolean
id
id:
undefined
|string
managed
managed:
undefined
|boolean
name
name:
undefined
|string
requireColons
requireColons:
undefined
|boolean
roles
roles:
undefined
|string
[]
user
user:
undefined
|object
Remarks
Always includes the user
object for the team member that uploaded the emoji from the app's settings, or for the bot user if uploaded using the API.
See
https://discord.com/developers/docs/resources/emoji#get-application-emoji
Defined in
getApplicationEmojis()
getApplicationEmojis: () =>
Promise
<object
>
Gets the list of emojis for an application.
Returns
Promise
<object
>
An object with the array of DiscordEmoji objects.
items
items:
object
[]
Remarks
Always includes the user
object for the team member that uploaded the emoji from the app's settings, or for the bot user if uploaded using the API.
See
https://discord.com/developers/docs/resources/emoji#list-application-emojis
Defined in
getApplicationInfo()
getApplicationInfo: () =>
Promise
<object
>
Get the applications info
Returns
Promise
<object
>
approximateGuildCount
approximateGuildCount:
undefined
|number
approximateUserInstallCount
approximateUserInstallCount:
undefined
|number
bot
bot:
undefined
|object
botPublic
botPublic:
boolean
botRequireCodeGrant
botRequireCodeGrant:
boolean
coverImage
coverImage:
undefined
|string
customInstallUrl
customInstallUrl:
undefined
|string
description
description:
string
eventWebhooksStatus
eventWebhooksStatus:
DiscordApplicationEventWebhookStatus
eventWebhooksTypes
eventWebhooksTypes:
undefined
|DiscordWebhookEventType
[]
eventWebhooksUrl
eventWebhooksUrl:
undefined
|null
|string
flags
flags:
undefined
|ApplicationFlags
guild
guild:
undefined
|object
guildId
guildId:
undefined
|string
icon
icon:
null
|string
id
id:
string
installParams
installParams:
undefined
|object
integrationTypesConfig
integrationTypesConfig:
undefined
|object
interactionsEndpointUrl
interactionsEndpointUrl:
undefined
|null
|string
name
name:
string
owner
owner:
undefined
|object
primarySkuId
primarySkuId:
undefined
|string
privacyPolicyUrl
privacyPolicyUrl:
undefined
|string
redirectUris
redirectUris:
undefined
|string
[]
roleConnectionsVerificationUrl
roleConnectionsVerificationUrl:
undefined
|null
|string
rpcOrigins
rpcOrigins:
undefined
|string
[]
slug
slug:
undefined
|string
tags
tags:
undefined
|string
[]
team
team:
null
|object
termsOfServiceUrl
termsOfServiceUrl:
undefined
|string
verifyKey
verifyKey:
string
Defined in
getAuditLog()
getAuditLog: (
guildId
,options
?) =>Promise
<object
>
Gets a guild's audit log.
Parameters
• guildId: BigString
The ID of the guild to get the audit log of.
• options?: GetGuildAuditLog
The parameters for the fetching of the audit log.
Returns
Promise
<object
>
An instance of DiscordAuditLog.
applicationCommands
applicationCommands:
object
[]
auditLogEntries
auditLogEntries:
object
[]
autoModerationRules
autoModerationRules:
undefined
|object
[]
guildScheduledEvents
guildScheduledEvents:
undefined
|object
[]
integrations
integrations:
object
[]
threads
threads:
object
[]
users
users:
object
[]
webhooks
webhooks: (
object
|object
)[]
Remarks
Requires the VIEW_AUDIT_LOG
permission.
See
https://discord.com/developers/docs/resources/audit-log#get-guild-audit-log
Defined in
getAutomodRule()
getAutomodRule: (
guildId
,ruleId
) =>Promise
<object
>
Gets an automod rule by its ID.
Parameters
• guildId: BigString
The ID of the guild to get the rule of.
• ruleId: BigString
The ID of the rule to get.
Returns
Promise
<object
>
An instance of DiscordAutoModerationRule.
actions
actions:
object
[]
creatorId
creatorId:
string
enabled
enabled:
boolean
eventType
eventType:
AutoModerationEventTypes
exemptChannels
exemptChannels:
string
[]
exemptRoles
exemptRoles:
string
[]
guildId
guildId:
string
id
id:
string
name
name:
string
triggerMetadata
triggerMetadata:
object
triggerMetadata.allowList
triggerMetadata.allowList:
undefined
|string
[]
triggerMetadata.keywordFilter
triggerMetadata.keywordFilter:
undefined
|string
[]
triggerMetadata.mentionRaidProtectionEnabled
triggerMetadata.mentionRaidProtectionEnabled:
undefined
|boolean
triggerMetadata.mentionTotalLimit
triggerMetadata.mentionTotalLimit:
undefined
|number
triggerMetadata.presets
triggerMetadata.presets:
undefined
|DiscordAutoModerationRuleTriggerMetadataPresets
[]
triggerMetadata.regexPatterns
triggerMetadata.regexPatterns:
string
[]
triggerType
triggerType:
AutoModerationTriggerTypes
Remarks
Requires the MANAGE_GUILD
permission.
See
https://discord.com/developers/docs/resources/auto-moderation#get-auto-moderation-rule
Defined in
getAutomodRules()
getAutomodRules: (
guildId
) =>Promise
<object
[]>
Gets the list of automod rules for a guild.
Parameters
• guildId: BigString
The ID of the guild to get the rules from.
Returns
Promise
<object
[]>
A collection of DiscordAutoModerationRule objects assorted by rule ID.
Remarks
Requires the MANAGE_GUILD
permission.
See
https://discord.com/developers/docs/resources/auto-moderation#list-auto-moderation-rules-for-guild
Defined in
getAvailableVoiceRegions()
getAvailableVoiceRegions: () =>
Promise
<object
[]>
Gets the list of available voice regions.
Returns
Promise
<object
[]>
A collection of DiscordVoiceRegion objects assorted by voice region ID.
Defined in
getBan()
getBan: (
guildId
,userId
) =>Promise
<object
>
Gets a ban by user ID.
Parameters
• guildId: BigString
The ID of the guild to get the ban from.
• userId: BigString
The ID of the user to get the ban for.
Returns
Promise
<object
>
An instance of DiscordBan.
reason
reason:
null
|string
user
user:
object
user.accentColor
user.accentColor:
undefined
|number
user.avatar
user.avatar:
null
|string
user.avatarDecorationData
user.avatarDecorationData:
undefined
|object
user.banner
user.banner:
undefined
|string
user.bot
user.bot:
undefined
|boolean
user.discriminator
user.discriminator:
string
user.email
user.email:
undefined
|null
|string
user.flags
user.flags:
undefined
|number
user.globalName
user.globalName:
null
|string
user.id
user.id:
string
user.locale
user.locale:
undefined
|string
user.mfaEnabled
user.mfaEnabled:
undefined
|boolean
user.premiumType
user.premiumType:
undefined
|PremiumTypes
user.publicFlags
user.publicFlags:
undefined
|number
user.system
user.system:
undefined
|boolean
user.username
user.username:
string
user.verified
user.verified:
undefined
|boolean
Remarks
Requires the BAN_MEMBERS
permission.
See
https://discord.com/developers/docs/resources/guild#get-guild-ban
Defined in
getBans()
getBans: (
guildId
,options
?) =>Promise
<object
[]>
Gets the list of bans for a guild.
Parameters
• guildId: BigString
The ID of the guild to get the list of bans for.
• options?: GetBans
The parameters for the fetching of the list of bans.
Returns
Promise
<object
[]>
A collection of DiscordBan objects assorted by user ID.
Remarks
Requires the BAN_MEMBERS
permission.
Users are ordered by their IDs in ascending order.
See
https://discord.com/developers/docs/resources/guild#get-guild-bans
Defined in
getChannel()
getChannel: (
channelId
) =>Promise
<object
>
Gets a channel by its ID.
Parameters
• channelId: BigString
The ID of the channel to get.
Returns
Promise
<object
>
An instance of DiscordChannel.
applicationId
applicationId:
undefined
|string
appliedTags
appliedTags:
undefined
|string
[]
availableTags
availableTags:
undefined
|object
[]
bitrate
bitrate:
undefined
|number
defaultAutoArchiveDuration
defaultAutoArchiveDuration:
undefined
|number
defaultForumLayout
defaultForumLayout:
undefined
|ForumLayout
defaultReactionEmoji
defaultReactionEmoji:
undefined
|null
|object
defaultSortOrder
defaultSortOrder:
undefined
|null
|SortOrderTypes
defaultThreadRateLimitPerUser
defaultThreadRateLimitPerUser:
undefined
|number
flags
flags:
undefined
|ChannelFlags
guildId
guildId:
undefined
|string
icon
icon:
undefined
|string
id
id:
string
lastMessageId
lastMessageId:
undefined
|null
|string
lastPinTimestamp
lastPinTimestamp:
undefined
|null
|string
managed
managed:
undefined
|boolean
member
member:
undefined
|object
memberCount
memberCount:
undefined
|number
messageCount
messageCount:
undefined
|number
name
name:
undefined
|string
newlyCreated
newlyCreated:
undefined
|boolean
nsfw
nsfw:
undefined
|boolean
ownerId
ownerId:
undefined
|string
parentId
parentId:
undefined
|null
|string
permissionOverwrites
permissionOverwrites:
undefined
|object
[]
permissions
permissions:
undefined
|string
position
position:
undefined
|number
rateLimitPerUser
rateLimitPerUser:
undefined
|number
recipients
recipients:
undefined
|object
[]
rtcRegion
rtcRegion:
undefined
|null
|string
threadMetadata
threadMetadata:
undefined
|object
topic
topic:
undefined
|null
|string
totalMessageSent
totalMessageSent:
undefined
|number
type
type:
ChannelTypes
userLimit
userLimit:
undefined
|number
videoQualityMode
videoQualityMode:
undefined
|VideoQualityModes
Remarks
If the channel is a thread, a DiscordThreadMember object is included in the result.
See
https://discord.com/developers/docs/resources/channel#get-channel
Defined in
getChannelInvites()
getChannelInvites: (
channelId
) =>Promise
<object
[]>
Gets the list of invites for a channel.
Parameters
• channelId: BigString
The ID of the channel to get the invites of.
Returns
Promise
<object
[]>
A collection of DiscordInviteMetadata objects assorted by invite code.
Remarks
Requires the MANAGE_CHANNELS
permission.
Only usable for guild channels.
See
https://discord.com/developers/docs/resources/channel#get-channel-invites
Defined in
getChannels()
getChannels: (
guildId
) =>Promise
<object
[]>
Gets the list of channels for a guild.
Parameters
• guildId: BigString
The ID of the guild to get the channels of.
Returns
Promise
<object
[]>
A collection of DiscordChannel objects assorted by channel ID.
Remarks
Excludes threads.
See
https://discord.com/developers/docs/resources/guild#get-guild-channels
Defined in
getChannelWebhooks()
getChannelWebhooks: (
channelId
) =>Promise
<Camelize
<DiscordWebhook
>[]>
Gets a list of webhooks for a channel.
Parameters
• channelId: BigString
The ID of the channel which to get the webhooks of.
Returns
Promise
<Camelize
<DiscordWebhook
>[]>
A collection of DiscordWebhook objects assorted by webhook ID.
Remarks
Requires the MANAGE_WEBHOOKS
permission.
See
https://discord.com/developers/docs/resources/webhook#get-channel-webhooks
Defined in
getCurrentAuthenticationInfo()
getCurrentAuthenticationInfo: (
bearerToken
) =>Promise
<object
>
Get the current authentication info for the authenticated user
Parameters
• bearerToken: string
Any OAuth2 derived access token
Returns
Promise
<object
>
An instance of DiscordCurrentAuthorization
application
application:
object
application.approximateGuildCount
application.approximateGuildCount:
undefined
|number
application.approximateUserInstallCount
application.approximateUserInstallCount:
undefined
|number
application.bot
application.bot:
undefined
|object
application.botPublic
application.botPublic:
boolean
application.botRequireCodeGrant
application.botRequireCodeGrant:
boolean
application.coverImage
application.coverImage:
undefined
|string
application.customInstallUrl
application.customInstallUrl:
undefined
|string
application.description
application.description:
string
application.eventWebhooksStatus
application.eventWebhooksStatus:
DiscordApplicationEventWebhookStatus
application.eventWebhooksTypes
application.eventWebhooksTypes:
undefined
|DiscordWebhookEventType
[]
application.eventWebhooksUrl
application.eventWebhooksUrl:
undefined
|null
|string
application.flags
application.flags:
undefined
|ApplicationFlags
application.guild
application.guild:
undefined
|object
application.guildId
application.guildId:
undefined
|string
application.icon
application.icon:
null
|string
application.id
application.id:
string
application.installParams
application.installParams:
undefined
|object
application.integrationTypesConfig
application.integrationTypesConfig:
undefined
|object
application.interactionsEndpointUrl
application.interactionsEndpointUrl:
undefined
|null
|string
application.name
application.name:
string
application.owner
application.owner:
undefined
|object
application.primarySkuId
application.primarySkuId:
undefined
|string
application.privacyPolicyUrl
application.privacyPolicyUrl:
undefined
|string
application.redirectUris
application.redirectUris:
undefined
|string
[]
application.roleConnectionsVerificationUrl
application.roleConnectionsVerificationUrl:
undefined
|null
|string
application.rpcOrigins
application.rpcOrigins:
undefined
|string
[]
application.slug
application.slug:
undefined
|string
application.tags
application.tags:
undefined
|string
[]
application.team
application.team:
null
|object
application.termsOfServiceUrl
application.termsOfServiceUrl:
undefined
|string
application.verifyKey
application.verifyKey:
string
expires
expires:
string
scopes
scopes:
OAuth2Scope
[]
user
user:
undefined
|object
Remarks
The user object is not defined if the scopes do not include identify
.
In the user object, if defined, the email is not included if the scopes do not include email
Defined in
getCurrentMember()
getCurrentMember: (
guildId
,bearerToken
) =>Promise
<object
>
Gets the current member object.
Parameters
• guildId: BigString
The ID of the guild to get the member object for.
• bearerToken: string
The access token of the user
Returns
Promise
<object
>
An instance of DiscordMemberWithUser.
avatar
avatar:
undefined
|string
avatarDecorationData
avatarDecorationData:
undefined
|null
|object
banner
banner:
undefined
|string
communicationDisabledUntil
communicationDisabledUntil:
undefined
|null
|string
deaf
deaf:
undefined
|boolean
flags
flags:
number
joinedAt
joinedAt:
string
mute
mute:
undefined
|boolean
nick
nick:
undefined
|null
|string
pending
pending:
undefined
|boolean
permissions
permissions:
undefined
|string
premiumSince
premiumSince:
undefined
|null
|string
roles
roles:
string
[]
user
user:
object
user.accentColor
user.accentColor:
undefined
|number
user.avatar
user.avatar:
null
|string
user.avatarDecorationData
user.avatarDecorationData:
undefined
|object
user.banner
user.banner:
undefined
|string
user.bot
user.bot:
undefined
|boolean
user.discriminator
user.discriminator:
string
user.email
user.email:
undefined
|null
|string
user.flags
user.flags:
undefined
|number
user.globalName
user.globalName:
null
|string
user.id
user.id:
string
user.locale
user.locale:
undefined
|string
user.mfaEnabled
user.mfaEnabled:
undefined
|boolean
user.premiumType
user.premiumType:
undefined
|PremiumTypes
user.publicFlags
user.publicFlags:
undefined
|number
user.system
user.system:
undefined
|boolean
user.username
user.username:
string
user.verified
user.verified:
undefined
|boolean
Remarks
The access tokens needs the guilds.members.read
scope
See
https://discord.com/developers/docs/resources/user#get-current-user-guild-member
Defined in
getCurrentUser()
getCurrentUser: (
bearerToken
) =>Promise
<object
>
Get the current user data.
Parameters
• bearerToken: string
The access token of the user
Returns
Promise
<object
>
accentColor
accentColor:
undefined
|number
avatar
avatar:
null
|string
avatarDecorationData
avatarDecorationData:
undefined
|object
banner
banner:
undefined
|string
bot
bot:
undefined
|boolean
discriminator
discriminator:
string
email
email:
undefined
|null
|string
flags
flags:
undefined
|number
globalName
globalName:
null
|string
id
id:
string
locale
locale:
undefined
|string
mfaEnabled
mfaEnabled:
undefined
|boolean
premiumType
premiumType:
undefined
|PremiumTypes
publicFlags
publicFlags:
undefined
|number
system
system:
undefined
|boolean
username
username:
string
verified
verified:
undefined
|boolean
Remarks
This requires the identify
scope.
To get the mail this also requires the email
scope
Defined in
getDmChannel()
getDmChannel: (
userId
) =>Promise
<object
>
Gets or creates a DM channel with a user.
Parameters
• userId: BigString
The ID of the user to create the DM channel with.
Returns
Promise
<object
>
An instance of DiscordChannel.
applicationId
applicationId:
undefined
|string
appliedTags
appliedTags:
undefined
|string
[]
availableTags
availableTags:
undefined
|object
[]
bitrate
bitrate:
undefined
|number
defaultAutoArchiveDuration
defaultAutoArchiveDuration:
undefined
|number
defaultForumLayout
defaultForumLayout:
undefined
|ForumLayout
defaultReactionEmoji
defaultReactionEmoji:
undefined
|null
|object
defaultSortOrder
defaultSortOrder:
undefined
|null
|SortOrderTypes
defaultThreadRateLimitPerUser
defaultThreadRateLimitPerUser:
undefined
|number
flags
flags:
undefined
|ChannelFlags
guildId
guildId:
undefined
|string
icon
icon:
undefined
|string
id
id:
string
lastMessageId
lastMessageId:
undefined
|null
|string
lastPinTimestamp
lastPinTimestamp:
undefined
|null
|string
managed
managed:
undefined
|boolean
member
member:
undefined
|object
memberCount
memberCount:
undefined
|number
messageCount
messageCount:
undefined
|number
name
name:
undefined
|string
newlyCreated
newlyCreated:
undefined
|boolean
nsfw
nsfw:
undefined
|boolean
ownerId
ownerId:
undefined
|string
parentId
parentId:
undefined
|null
|string
permissionOverwrites
permissionOverwrites:
undefined
|object
[]
permissions
permissions:
undefined
|string
position
position:
undefined
|number
rateLimitPerUser
rateLimitPerUser:
undefined
|number
recipients
recipients:
undefined
|object
[]
rtcRegion
rtcRegion:
undefined
|null
|string
threadMetadata
threadMetadata:
undefined
|object
topic
topic:
undefined
|null
|string
totalMessageSent
totalMessageSent:
undefined
|number
type
type:
ChannelTypes
userLimit
userLimit:
undefined
|number
videoQualityMode
videoQualityMode:
undefined
|VideoQualityModes
See
https://discord.com/developers/docs/resources/user#create-dm
Defined in
getEmoji()
getEmoji: (
guildId
,emojiId
) =>Promise
<object
>
Gets an emoji by its ID.
Parameters
• guildId: BigString
The ID of the guild from which to get the emoji.
• emojiId: BigString
The ID of the emoji to get.
Returns
Promise
<object
>
An instance of DiscordEmoji.
animated
animated:
undefined
|boolean
available
available:
undefined
|boolean
id
id:
undefined
|string
managed
managed:
undefined
|boolean
name
name:
undefined
|string
requireColons
requireColons:
undefined
|boolean
roles
roles:
undefined
|string
[]
user
user:
undefined
|object
Remarks
Includes the user
field if the bot has the MANAGE_GUILD_EXPRESSIONS
permission,
or if the bot created the emoji and has the the CREATE_GUILD_EXPRESSIONS
permission.
See
https://discord.com/developers/docs/resources/emoji#get-guild-emoji
Defined in
getEmojis()
getEmojis: (
guildId
) =>Promise
<object
[]>
Gets the list of emojis for a guild.
Parameters
• guildId: BigString
The ID of the guild which to get the emojis of.
Returns
Promise
<object
[]>
A collection of DiscordEmoji objects assorted by emoji ID.
Remarks
Includes user
fields if the bot has the CREATE_GUILD_EXPRESSIONS
or MANAGE_GUILD_EXPRESSIONS
permission.
See
https://discord.com/developers/docs/resources/emoji#list-guild-emojis
Defined in
getFollowupMessage()
getFollowupMessage: (
token
,messageId
) =>Promise
<object
>
Gets a follow-up message to an interaction by the ID of the message.
Parameters
• token: string
The interaction token to use, provided in the original interaction.
• messageId: BigString
The ID of the message to get.
Returns
Promise
<object
>
An instance of DiscordMessage.
activity
activity:
undefined
|object
application
application:
undefined
|object
applicationId
applicationId:
undefined
|string
attachments
attachments:
object
[]
author
author:
object
author.accentColor
author.accentColor:
undefined
|number
author.avatar
author.avatar:
null
|string
author.avatarDecorationData
author.avatarDecorationData:
undefined
|object
author.banner
author.banner:
undefined
|string
author.bot
author.bot:
undefined
|boolean
author.discriminator
author.discriminator:
string
author.email
author.email:
undefined
|null
|string
author.flags
author.flags:
undefined
|number
author.globalName
author.globalName:
null
|string
author.id
author.id:
string
author.locale
author.locale:
undefined
|string
author.mfaEnabled
author.mfaEnabled:
undefined
|boolean
author.premiumType
author.premiumType:
undefined
|PremiumTypes
author.publicFlags
author.publicFlags:
undefined
|number
author.system
author.system:
undefined
|boolean
author.username
author.username:
string
author.verified
author.verified:
undefined
|boolean
call
call:
undefined
|object
channelId
channelId:
string
components
components:
undefined
| (object
|object
|object
|object
)[]
content
content:
undefined
|string
editedTimestamp
editedTimestamp:
null
|string
embeds
embeds:
object
[]
flags
flags:
undefined
|MessageFlags
guildId
guildId:
undefined
|string
id
id:
string
interaction
interaction:
undefined
|object
interactionMetadata
interactionMetadata:
undefined
|object
|object
|object
member
member:
undefined
|object
mentionChannels
mentionChannels:
undefined
|object
[]
mentionEveryone
mentionEveryone:
boolean
mentionRoles
mentionRoles:
undefined
|string
[]
mentions
mentions:
object
[]
messageReference
messageReference:
undefined
|object
messageSnapshots
messageSnapshots:
undefined
|object
[]
nonce
nonce:
undefined
|string
|number
pinned
pinned:
boolean
poll
poll:
undefined
|object
position
position:
undefined
|number
reactions
reactions:
undefined
|object
[]
referencedMessage
referencedMessage:
undefined
| { id: string; channelId: string; guildId?: string | undefined; author: { username: string; globalName: string | null; locale?: string | undefined; flags?: number | undefined; premiumType?: PremiumTypes | undefined; ... 11 more ...; avatarDecorationData?: { ...; } | undefined; }; ... 31 more ...; call?: { ...; } | un...
stickerItems
stickerItems:
undefined
|object
[]
stickers
stickers:
undefined
|object
[]
thread
thread:
undefined
|object
timestamp
timestamp:
string
tts
tts:
boolean
type
type:
MessageTypes
webhookId
webhookId:
undefined
|string
Remarks
Unlike getMessage()
, this endpoint allows the bot user to act without:
- Needing to be able to see the contents of the channel that the message is in. (
READ_MESSAGES
permission.) - Requiring the
MESSAGE_CONTENT
intent.
Does not support ephemeral follow-up messages due to these being stateless.
See
https://discord.com/developers/docs/interactions/receiving-and-responding#get-followup-message
Defined in
getGatewayBot()
getGatewayBot: () =>
Promise
<object
>
Get the bots Gateway metadata that can help during the operation of large or sharded bots.
Returns
Promise
<object
>
sessionStartLimit
sessionStartLimit:
object
sessionStartLimit.maxConcurrency
sessionStartLimit.maxConcurrency:
number
sessionStartLimit.remaining
sessionStartLimit.remaining:
number
sessionStartLimit.resetAfter
sessionStartLimit.resetAfter:
number
sessionStartLimit.total
sessionStartLimit.total:
number
shards
shards:
number
url
url:
string
Defined in
getGlobalApplicationCommand()
getGlobalApplicationCommand: (
commandId
) =>Promise
<object
>
Gets a global application command by its ID.
Parameters
• commandId: BigString
The ID of the command to get.
Returns
Promise
<object
>
An instance of DiscordApplicationCommand.
applicationId
applicationId:
string
contexts
contexts:
undefined
|null
|DiscordInteractionContextType
[]
defaultMemberPermissions
defaultMemberPermissions:
undefined
|null
|string
description
description:
undefined
|string
descriptionLocalizations
descriptionLocalizations:
undefined
|null
|object
dmPermission
dmPermission:
undefined
|boolean
guildId
guildId:
undefined
|string
handler
handler:
undefined
|DiscordInteractionEntryPointCommandHandlerType
id
id:
string
integrationTypes
integrationTypes:
undefined
|DiscordApplicationIntegrationType
[]
name
name:
string
nameLocalizations
nameLocalizations:
undefined
|null
|object
nsfw
nsfw:
undefined
|boolean
options
options:
undefined
|object
[]
type
type:
undefined
|ApplicationCommandTypes
version
version:
undefined
|string
See
https://discord.com/developers/docs/interactions/application-commands#get-global-application-command
Defined in
getGlobalApplicationCommands()
getGlobalApplicationCommands: () =>
Promise
<object
[]>
Gets the list of your bot's global application commands.
Returns
Promise
<object
[]>
A collection of DiscordApplicationCommand objects assorted by command ID.
See
Defined in
getGroupDmChannel()
getGroupDmChannel: (
options
) =>Promise
<object
>
Create a new group DM channel with multiple users.
Parameters
• options: GetGroupDmOptions
The options for create a new group dm
Returns
Promise
<object
>
An instance of DiscordChannel.
applicationId
applicationId:
undefined
|string
appliedTags
appliedTags:
undefined
|string
[]
availableTags
availableTags:
undefined
|object
[]
bitrate
bitrate:
undefined
|number
defaultAutoArchiveDuration
defaultAutoArchiveDuration:
undefined
|number
defaultForumLayout
defaultForumLayout:
undefined
|ForumLayout
defaultReactionEmoji
defaultReactionEmoji:
undefined
|null
|object
defaultSortOrder
defaultSortOrder:
undefined
|null
|SortOrderTypes
defaultThreadRateLimitPerUser
defaultThreadRateLimitPerUser:
undefined
|number
flags
flags:
undefined
|ChannelFlags
guildId
guildId:
undefined
|string
icon
icon:
undefined
|string
id
id:
string
lastMessageId
lastMessageId:
undefined
|null
|string
lastPinTimestamp
lastPinTimestamp:
undefined
|null
|string
managed
managed:
undefined
|boolean
member
member:
undefined
|object
memberCount
memberCount:
undefined
|number
messageCount
messageCount:
undefined
|number
name
name:
undefined
|string
newlyCreated
newlyCreated:
undefined
|boolean
nsfw
nsfw:
undefined
|boolean
ownerId
ownerId:
undefined
|string
parentId
parentId:
undefined
|null
|string
permissionOverwrites
permissionOverwrites:
undefined
|object
[]
permissions
permissions:
undefined
|string
position
position:
undefined
|number
rateLimitPerUser
rateLimitPerUser:
undefined
|number
recipients
recipients:
undefined
|object
[]
rtcRegion
rtcRegion:
undefined
|null
|string
threadMetadata
threadMetadata:
undefined
|object
topic
topic:
undefined
|null
|string
totalMessageSent
totalMessageSent:
undefined
|number
type
type:
ChannelTypes
userLimit
userLimit:
undefined
|number
videoQualityMode
videoQualityMode:
undefined
|VideoQualityModes
Remarks
The access tokens require to have the gdm.join
scope
This endpoint is limited to 10 active group DMs.
Fires a Channel create gateway event.
See
https://discord.com/developers/docs/resources/user#create-group-dm
Defined in
getGuild()
getGuild: (
guildId
,options
?) =>Promise
<object
>
Gets a guild by its ID.
Parameters
• guildId: BigString
The ID of the guild to get.
• options?
The parameters for the fetching of the guild.
• options.counts?: boolean
Returns
Promise
<object
>
An instance of DiscordGuild.
afkChannelId
afkChannelId:
null
|string
afkTimeout
afkTimeout:
number
applicationId
applicationId:
null
|string
approximateMemberCount
approximateMemberCount:
undefined
|number
approximatePresenceCount
approximatePresenceCount:
undefined
|number
banner
banner:
null
|string
channels
channels:
undefined
|object
[]
defaultMessageNotifications
defaultMessageNotifications:
DefaultMessageNotificationLevels
description
description:
null
|string
discoverySplash
discoverySplash:
null
|string
emojis
emojis:
object
[]
explicitContentFilter
explicitContentFilter:
ExplicitContentFilterLevels
features
features:
GuildFeatures
[]
icon
icon:
null
|string
iconHash
iconHash:
undefined
|null
|string
id
id:
string
joinedAt
joinedAt:
undefined
|string
large
large:
undefined
|boolean
maxMembers
maxMembers:
undefined
|number
maxPresences
maxPresences:
undefined
|null
|number
maxStageVideoChannelUsers
maxStageVideoChannelUsers:
undefined
|number
maxVideoChannelUsers
maxVideoChannelUsers:
undefined
|number
memberCount
memberCount:
undefined
|number
members
members:
undefined
|object
[]
mfaLevel
mfaLevel:
MfaLevels
name
name:
string
nsfwLevel
nsfwLevel:
GuildNsfwLevel
owner
owner:
undefined
|boolean
ownerId
ownerId:
string
permissions
permissions:
undefined
|string
preferredLocale
preferredLocale:
string
premiumProgressBarEnabled
premiumProgressBarEnabled:
boolean
premiumSubscriptionCount
premiumSubscriptionCount:
undefined
|number
premiumTier
premiumTier:
PremiumTiers
presences
presences:
undefined
|object
[]
publicUpdatesChannelId
publicUpdatesChannelId:
null
|string
roles
roles:
object
[]
rulesChannelId
rulesChannelId:
null
|string
safetyAlertsChannelId
safetyAlertsChannelId:
null
|string
soundboardSounds
soundboardSounds:
undefined
|object
[]
splash
splash:
null
|string
stageInstances
stageInstances:
undefined
|object
[]
stickers
stickers:
undefined
|object
[]
systemChannelFlags
systemChannelFlags:
SystemChannelFlags
systemChannelId
systemChannelId:
null
|string
threads
threads:
undefined
|object
[]
unavailable
unavailable:
undefined
|boolean
vanityUrlCode
vanityUrlCode:
null
|string
verificationLevel
verificationLevel:
VerificationLevels
voiceStates
voiceStates:
undefined
|object
[]
welcomeScreen
welcomeScreen:
undefined
|object
widgetChannelId
widgetChannelId:
undefined
|null
|string
widgetEnabled
widgetEnabled:
undefined
|boolean
See
https://discord.com/developers/docs/resources/guild#get-guild
Defined in
getGuildApplicationCommand()
getGuildApplicationCommand: (
commandId
,guildId
) =>Promise
<object
>
Gets a guild application command by its ID.
Parameters
• commandId: BigString
The ID of the command to get.
• guildId: BigString
The ID of the guild the command is registered in.
Returns
Promise
<object
>
An instance of DiscordApplicationCommand.
applicationId
applicationId:
string
contexts
contexts:
undefined
|null
|DiscordInteractionContextType
[]
defaultMemberPermissions
defaultMemberPermissions:
undefined
|null
|string
description
description:
undefined
|string
descriptionLocalizations
descriptionLocalizations:
undefined
|null
|object
dmPermission
dmPermission:
undefined
|boolean
guildId
guildId:
undefined
|string
handler
handler:
undefined
|DiscordInteractionEntryPointCommandHandlerType
id
id:
string
integrationTypes
integrationTypes:
undefined
|DiscordApplicationIntegrationType
[]
name
name:
string
nameLocalizations
nameLocalizations:
undefined
|null
|object
nsfw
nsfw:
undefined
|boolean
options
options:
undefined
|object
[]
type
type:
undefined
|ApplicationCommandTypes
version
version:
undefined
|string
See
https://discord.com/developers/docs/interactions/application-commands#get-guild-application-command
Defined in
getGuildApplicationCommands()
getGuildApplicationCommands: (
guildId
) =>Promise
<object
[]>
Gets the list of application commands registered by your bot in a guild.
Parameters
• guildId: BigString
The ID of the guild the commands are registered in.
Returns
Promise
<object
[]>
A collection of DiscordApplicationCommand objects assorted by command ID.
See
Defined in
getGuildOnboarding()
getGuildOnboarding: (
guildId
) =>Promise
<object
>
Get the guild onboarding
Parameters
• guildId: BigString
The guild to get the onboarding from
Returns
Promise
<object
>
defaultChannelIds
defaultChannelIds:
string
[]
enabled
enabled:
boolean
guildId
guildId:
string
mode
prompts
prompts:
object
[]
Defined in
getGuildPreview()
getGuildPreview: (
guildId
) =>Promise
<object
>
Gets the preview of a guild by a guild's ID.
Parameters
• guildId: BigString
The ID of the guild to get the preview of.
Returns
Promise
<object
>
An instance of DiscordGuildPreview.
approximateMemberCount
approximateMemberCount:
number
approximatePresenceCount
approximatePresenceCount:
number
description
description:
null
|string
discoverySplash
discoverySplash:
null
|string
emojis
emojis:
object
[]
features
features:
GuildFeatures
[]
icon
icon:
null
|string
id
id:
string
name
name:
string
splash
splash:
null
|string
stickers
stickers:
object
[]
Remarks
If the bot user is not in the guild, the guild must be discoverable.
See
https://discord.com/developers/docs/resources/guild#get-guild-preview
Defined in
getGuilds()
getGuilds: (
bearerToken
?,options
?) =>Promise
<Partial
<object
>[]>
Get the user guilds.
Parameters
• bearerToken?: string
The access token of the user, if unspecified the bot token is used instead
• options?: GetUserGuilds
The parameters for the fetching of the guild.
Returns
Promise
<Partial
<object
>[]>
An array of partial DiscordGuild.
Remarks
If used with an access token, the token needs to have the guilds
scope
See
https://discord.com/developers/docs/resources/user#get-current-user-guilds
Defined in
getGuildSoundboardSound()
getGuildSoundboardSound: (
guildId
,soundId
) =>Promise
<object
>
Returns a soundboard sound object for the given sound id.
Parameters
• guildId: BigString
The guild to get the sounds from
• soundId: BigString
The sound id
Returns
Promise
<object
>
available
available:
boolean
emojiId
emojiId:
null
|string
emojiName
emojiName:
null
|string
guildId
guildId:
undefined
|string
name
name:
string
soundId
soundId:
string
user
user:
undefined
|object
volume
volume:
number
Remarks
Includes user
fields if the bot has the CREATE_GUILD_EXPRESSIONS
or MANAGE_GUILD_EXPRESSIONS
permission.
Defined in
getGuildSticker()
getGuildSticker: (
guildId
,stickerId
) =>Promise
<object
>
Returns a sticker object for the given guild and sticker IDs.
Parameters
• guildId: BigString
The ID of the guild to get
• stickerId: BigString
The ID of the sticker to get
Returns
Promise
<object
>
available
available:
undefined
|boolean
description
description:
string
formatType
formatType:
StickerFormatTypes
guildId
guildId:
undefined
|string
id
id:
string
name
name:
string
packId
packId:
undefined
|string
sortValue
sortValue:
undefined
|number
tags
tags:
string
type
type:
StickerTypes
user
user:
undefined
|object
Remarks
Includes the user field if the bot has the CREATE_GUILD_EXPRESSIONS
or MANAGE_GUILD_EXPRESSIONS
permission.
See
https://discord.com/developers/docs/resources/sticker#get-guild-sticker
Defined in
getGuildStickers()
getGuildStickers: (
guildId
) =>Promise
<object
[]>
Returns an array of sticker objects for the given guild.
Parameters
• guildId: BigString
The ID of the guild to get
Returns
Promise
<object
[]>
A collection of DiscordSticker objects assorted by sticker ID.
Remarks
Includes user fields if the bot has the CREATE_GUILD_EXPRESSIONS
or MANAGE_GUILD_EXPRESSIONS
permission.
See
https://discord.com/developers/docs/resources/sticker#list-guild-stickers
Defined in
getGuildTemplate()
getGuildTemplate: (
templateCode
) =>Promise
<object
>
Gets a template by its code.
Parameters
• templateCode: string
The code of the template to get.
Returns
Promise
<object
>
An instance of DiscordTemplate.
code
code:
string
createdAt
createdAt:
string
creator
creator:
object
creator.accentColor
creator.accentColor:
undefined
|number
creator.avatar
creator.avatar:
null
|string
creator.avatarDecorationData
creator.avatarDecorationData:
undefined
|object
creator.banner
creator.banner:
undefined
|string
creator.bot
creator.bot:
undefined
|boolean
creator.discriminator
creator.discriminator:
string
creator.email
creator.email:
undefined
|null
|string
creator.flags
creator.flags:
undefined
|number
creator.globalName
creator.globalName:
null
|string
creator.id
creator.id:
string
creator.locale
creator.locale:
undefined
|string
creator.mfaEnabled
creator.mfaEnabled:
undefined
|boolean
creator.premiumType
creator.premiumType:
undefined
|PremiumTypes
creator.publicFlags
creator.publicFlags:
undefined
|number
creator.system
creator.system:
undefined
|boolean
creator.username
creator.username:
string
creator.verified
creator.verified:
undefined
|boolean
creatorId
creatorId:
string
description
description:
null
|string
isDirty
isDirty:
null
|boolean
name
name:
string
serializedSourceGuild
serializedSourceGuild:
object
serializedSourceGuild.afkChannelId
serializedSourceGuild.afkChannelId:
null
|number
serializedSourceGuild.afkTimeout
serializedSourceGuild.afkTimeout:
number
serializedSourceGuild.applicationId
serializedSourceGuild.applicationId:
undefined
|null
|string
serializedSourceGuild.approximateMemberCount
serializedSourceGuild.approximateMemberCount:
undefined
|number
serializedSourceGuild.approximatePresenceCount
serializedSourceGuild.approximatePresenceCount:
undefined
|number
serializedSourceGuild.banner
serializedSourceGuild.banner:
undefined
|null
|string
serializedSourceGuild.channels
serializedSourceGuild.channels:
object
[]
serializedSourceGuild.defaultMessageNotifications
serializedSourceGuild.defaultMessageNotifications:
DefaultMessageNotificationLevels
serializedSourceGuild.description
serializedSourceGuild.description:
null
|string
serializedSourceGuild.discoverySplash
serializedSourceGuild.discoverySplash:
undefined
|null
|string
serializedSourceGuild.emojis
serializedSourceGuild.emojis:
undefined
|object
[]
serializedSourceGuild.explicitContentFilter
serializedSourceGuild.explicitContentFilter:
ExplicitContentFilterLevels
serializedSourceGuild.features
serializedSourceGuild.features:
undefined
|GuildFeatures
[]
serializedSourceGuild.icon
serializedSourceGuild.icon:
undefined
|null
|string
serializedSourceGuild.iconHash
serializedSourceGuild.iconHash:
undefined
|null
|string
serializedSourceGuild.id
serializedSourceGuild.id:
undefined
|string
serializedSourceGuild.joinedAt
serializedSourceGuild.joinedAt:
undefined
|string
serializedSourceGuild.large
serializedSourceGuild.large:
undefined
|boolean
serializedSourceGuild.maxMembers
serializedSourceGuild.maxMembers:
undefined
|number
serializedSourceGuild.maxPresences
serializedSourceGuild.maxPresences:
undefined
|null
|number
serializedSourceGuild.maxStageVideoChannelUsers
serializedSourceGuild.maxStageVideoChannelUsers:
undefined
|number
serializedSourceGuild.maxVideoChannelUsers
serializedSourceGuild.maxVideoChannelUsers:
undefined
|number
serializedSourceGuild.memberCount
serializedSourceGuild.memberCount:
undefined
|number
serializedSourceGuild.members
serializedSourceGuild.members:
undefined
|object
[]
serializedSourceGuild.mfaLevel
serializedSourceGuild.mfaLevel:
undefined
|MfaLevels
serializedSourceGuild.name
serializedSourceGuild.name:
string
serializedSourceGuild.nsfwLevel
serializedSourceGuild.nsfwLevel:
undefined
|GuildNsfwLevel
serializedSourceGuild.owner
serializedSourceGuild.owner:
undefined
|boolean
serializedSourceGuild.ownerId
serializedSourceGuild.ownerId:
undefined
|string
serializedSourceGuild.permissions
serializedSourceGuild.permissions:
undefined
|string
serializedSourceGuild.preferredLocale
serializedSourceGuild.preferredLocale:
string
serializedSourceGuild.premiumProgressBarEnabled
serializedSourceGuild.premiumProgressBarEnabled:
undefined
|boolean
serializedSourceGuild.premiumSubscriptionCount
serializedSourceGuild.premiumSubscriptionCount:
undefined
|number
serializedSourceGuild.premiumTier
serializedSourceGuild.premiumTier:
undefined
|PremiumTiers
serializedSourceGuild.presences
serializedSourceGuild.presences:
undefined
|object
[]
serializedSourceGuild.publicUpdatesChannelId
serializedSourceGuild.publicUpdatesChannelId:
undefined
|null
|string
serializedSourceGuild.roles
serializedSourceGuild.roles:
object
[]
serializedSourceGuild.rulesChannelId
serializedSourceGuild.rulesChannelId:
undefined
|null
|string
serializedSourceGuild.safetyAlertsChannelId
serializedSourceGuild.safetyAlertsChannelId:
undefined
|null
|string
serializedSourceGuild.soundboardSounds
serializedSourceGuild.soundboardSounds:
undefined
|object
[]
serializedSourceGuild.splash
serializedSourceGuild.splash:
undefined
|null
|string
serializedSourceGuild.stageInstances
serializedSourceGuild.stageInstances:
undefined
|object
[]
serializedSourceGuild.stickers
serializedSourceGuild.stickers:
undefined
|object
[]
serializedSourceGuild.systemChannelFlags
serializedSourceGuild.systemChannelFlags:
SystemChannelFlags
serializedSourceGuild.systemChannelId
serializedSourceGuild.systemChannelId:
null
|number
serializedSourceGuild.threads
serializedSourceGuild.threads:
undefined
|object
[]
serializedSourceGuild.unavailable
serializedSourceGuild.unavailable:
undefined
|boolean
serializedSourceGuild.vanityUrlCode
serializedSourceGuild.vanityUrlCode:
undefined
|null
|string
serializedSourceGuild.verificationLevel
serializedSourceGuild.verificationLevel:
VerificationLevels
serializedSourceGuild.voiceStates
serializedSourceGuild.voiceStates:
undefined
|object
[]
serializedSourceGuild.welcomeScreen
serializedSourceGuild.welcomeScreen:
undefined
|object
serializedSourceGuild.widgetChannelId
serializedSourceGuild.widgetChannelId:
undefined
|null
|string
serializedSourceGuild.widgetEnabled
serializedSourceGuild.widgetEnabled:
undefined
|boolean
sourceGuildId
sourceGuildId:
string
updatedAt
updatedAt:
string
usageCount
usageCount:
number
Remarks
Requires the MANAGE_GUILD
permission.
See
https://discord.com/developers/docs/resources/guild-template#get-guild-template
Defined in
getGuildTemplates()
getGuildTemplates: (
guildId
) =>Promise
<object
[]>
Gets the list of templates for a guild.
Parameters
• guildId: BigString
The ID of the guild to get the list of templates for.
Returns
Promise
<object
[]>
A collection of DiscordTemplate objects assorted by template code.
Remarks
Requires the MANAGE_GUILD
permission.
See
https://discord.com/developers/docs/resources/guild-template#get-guild-templates
Defined in
getGuildWebhooks()
getGuildWebhooks: (
guildId
) =>Promise
<Camelize
<DiscordWebhook
>[]>
Gets the list of webhooks for a guild.
Parameters
• guildId: BigString
The ID of the guild to get the list of webhooks for.
Returns
Promise
<Camelize
<DiscordWebhook
>[]>
A collection of DiscordWebhook objects assorted by webhook ID.
Remarks
Requires the MANAGE_WEBHOOKS
permission.
See
https://discord.com/developers/docs/resources/webhook#get-guild-webhooks
Defined in
getIntegrations()
getIntegrations: (
guildId
) =>Promise
<object
[]>
Gets the list of integrations attached to a guild.
Parameters
• guildId: BigString
The ID of the guild to get the list of integrations from.
Returns
Promise
<object
[]>
A collection of DiscordIntegration objects assorted by integration ID.
Remarks
Requires the MANAGE_GUILD
permission.
See
https://discord.com/developers/docs/resources/guild#get-guild-integrations
Defined in
getInvite()
getInvite: (
inviteCode
,options
?) =>Promise
<object
>
Gets an invite to a channel by its invite code.
Parameters
• inviteCode: string
The invite code of the invite to get.
• options?: GetInvite
The parameters for the fetching of the invite.
Returns
Promise
<object
>
An instance of DiscordInviteMetadata.
approximateMemberCount
approximateMemberCount:
undefined
|number
approximatePresenceCount
approximatePresenceCount:
undefined
|number
channel
channel:
null
|object
code
code:
string
createdAt
createdAt:
string
expiresAt
expiresAt:
undefined
|null
|string
guild
guild:
undefined
|object
guildScheduledEvent
guildScheduledEvent:
undefined
|object
inviter
inviter:
undefined
|object
maxAge
maxAge:
number
maxUses
maxUses:
number
stageInstance
stageInstance:
undefined
|object
targetApplication
targetApplication:
undefined
|object
targetType
targetType:
undefined
|TargetTypes
targetUser
targetUser:
undefined
|object
temporary
temporary:
boolean
type
type:
DiscordInviteType
uses
uses:
number
See
https://discord.com/developers/docs/resources/invite#get-invite
Defined in
getInvites()
getInvites: (
guildId
) =>Promise
<object
[]>
Gets the list of invites for a guild.
Parameters
• guildId: BigString
The ID of the guild to get the invites from.
Returns
Promise
<object
[]>
A collection of DiscordInviteMetadata objects assorted by invite code.
Remarks
Requires the MANAGE_GUILD
permission.
See
https://discord.com/developers/docs/resources/invite#get-invites
Defined in
getMember()
getMember: (
guildId
,userId
) =>Promise
<object
>
Gets the member object by user ID.
Parameters
• guildId: BigString
The ID of the guild to get the member object for.
• userId: BigString
The ID of the user to get the member object for.
Returns
Promise
<object
>
An instance of DiscordMemberWithUser.
avatar
avatar:
undefined
|string
avatarDecorationData
avatarDecorationData:
undefined
|null
|object
banner
banner:
undefined
|string
communicationDisabledUntil
communicationDisabledUntil:
undefined
|null
|string
deaf
deaf:
undefined
|boolean
flags
flags:
number
joinedAt
joinedAt:
string
mute
mute:
undefined
|boolean
nick
nick:
undefined
|null
|string
pending
pending:
undefined
|boolean
permissions
permissions:
undefined
|string
premiumSince
premiumSince:
undefined
|null
|string
roles
roles:
string
[]
user
user:
object
user.accentColor
user.accentColor:
undefined
|number
user.avatar
user.avatar:
null
|string
user.avatarDecorationData
user.avatarDecorationData:
undefined
|object
user.banner
user.banner:
undefined
|string
user.bot
user.bot:
undefined
|boolean
user.discriminator
user.discriminator:
string
user.email
user.email:
undefined
|null
|string
user.flags
user.flags:
undefined
|number
user.globalName
user.globalName:
null
|string
user.id
user.id:
string
user.locale
user.locale:
undefined
|string
user.mfaEnabled
user.mfaEnabled:
undefined
|boolean
user.premiumType
user.premiumType:
undefined
|PremiumTypes
user.publicFlags
user.publicFlags:
undefined
|number
user.system
user.system:
undefined
|boolean
user.username
user.username:
string
user.verified
user.verified:
undefined
|boolean
See
https://discord.com/developers/docs/resources/guild#get-guild-member
Defined in
getMembers()
getMembers: (
guildId
,options
) =>Promise
<object
[]>
Gets the list of members for a guild.
Parameters
• guildId: BigString
The ID of the guild to get the list of members for.
• options: ListGuildMembers
The parameters for the fetching of the members.
Returns
Promise
<object
[]>
A collection of DiscordMemberWithUser objects assorted by user ID.
Remarks
Requires the GUILD_MEMBERS
intent.
⚠️ It is not recommended to use this endpoint with very large bots. Instead, opt to use fetchMembers()
:
REST communication only permits 50 requests to be made per second, while gateways allow for up to 120 requests
per minute per shard. For more information, read https://discord.com/developers/docs/topics/rate-limits#rate-limits.
See
- https://discord.com/developers/docs/resources/guild#list-guild-members
- https://discord.com/developers/docs/topics/gateway#request-guild-members
- https://discord.com/developers/docs/topics/rate-limits#rate-limits
Defined in
getMessage()
getMessage: (
channelId
,messageId
) =>Promise
<object
>
Gets a message from a channel by the ID of the message.
Parameters
• channelId: BigString
The ID of the channel from which to get the message.
• messageId: BigString
The ID of the message to get.
Returns
Promise
<object
>
An instance of DiscordMessage.
activity
activity:
undefined
|object
application
application:
undefined
|object
applicationId
applicationId:
undefined
|string
attachments
attachments:
object
[]
author
author:
object
author.accentColor
author.accentColor:
undefined
|number
author.avatar
author.avatar:
null
|string
author.avatarDecorationData
author.avatarDecorationData:
undefined
|object
author.banner
author.banner:
undefined
|string
author.bot
author.bot:
undefined
|boolean
author.discriminator
author.discriminator:
string
author.email
author.email:
undefined
|null
|string
author.flags
author.flags:
undefined
|number
author.globalName
author.globalName:
null
|string
author.id
author.id:
string
author.locale
author.locale:
undefined
|string
author.mfaEnabled
author.mfaEnabled:
undefined
|boolean
author.premiumType
author.premiumType:
undefined
|PremiumTypes
author.publicFlags
author.publicFlags:
undefined
|number
author.system
author.system:
undefined
|boolean
author.username
author.username:
string
author.verified
author.verified:
undefined
|boolean
call
call:
undefined
|object
channelId
channelId:
string
components
components:
undefined
| (object
|object
|object
|object
)[]
content
content:
undefined
|string
editedTimestamp
editedTimestamp:
null
|string
embeds
embeds:
object
[]
flags
flags:
undefined
|MessageFlags
guildId
guildId:
undefined
|string
id
id:
string
interaction
interaction:
undefined
|object
interactionMetadata
interactionMetadata:
undefined
|object
|object
|object
member
member:
undefined
|object
mentionChannels
mentionChannels:
undefined
|object
[]
mentionEveryone
mentionEveryone:
boolean
mentionRoles
mentionRoles:
undefined
|string
[]
mentions
mentions:
object
[]
messageReference
messageReference:
undefined
|object
messageSnapshots
messageSnapshots:
undefined
|object
[]
nonce
nonce:
undefined
|string
|number
pinned
pinned:
boolean
poll
poll:
undefined
|object
position
position:
undefined
|number
reactions
reactions:
undefined
|object
[]
referencedMessage
referencedMessage:
undefined
| { id: string; channelId: string; guildId?: string | undefined; author: { username: string; globalName: string | null; locale?: string | undefined; flags?: number | undefined; premiumType?: PremiumTypes | undefined; ... 11 more ...; avatarDecorationData?: { ...; } | undefined; }; ... 31 more ...; call?: { ...; } | un...
stickerItems
stickerItems:
undefined
|object
[]
stickers
stickers:
undefined
|object
[]
thread
thread:
undefined
|object
timestamp
timestamp:
string
tts
tts:
boolean
type
type:
MessageTypes
webhookId
webhookId:
undefined
|string
Remarks
Requires that the bot user be able to see the contents of the channel in which the message was posted.
If getting a message from a guild channel:
- Requires the
READ_MESSAGE_HISTORY
permission.
See
https://discord.com/developers/docs/resources/channel#get-channel-message
Defined in
getMessages()
getMessages: (
channelId
,options
?) =>Promise
<object
[]>
Gets multiple messages from a channel.
Parameters
• channelId: BigString
The ID of the channel from which to get the messages.
• options?: GetMessagesOptions
The parameters for the fetching of the messages.
Returns
Promise
<object
[]>
A collection of DiscordMessage objects assorted by message ID.
Remarks
Requires that the bot user be able to see the contents of the channel in which the messages were posted.
If getting a messages from a guild channel:
- Requires the
READ_MESSAGE_HISTORY
permission.
See
https://discord.com/developers/docs/resources/channel#get-channel-messages
Defined in
getOriginalInteractionResponse()
getOriginalInteractionResponse: (
token
) =>Promise
<object
>
Gets the initial message response to an interaction.
Parameters
• token: string
The interaction token to use, provided in the original interaction.
Returns
Promise
<object
>
An instance of DiscordMessage.
activity
activity:
undefined
|object
application
application:
undefined
|object
applicationId
applicationId:
undefined
|string
attachments
attachments:
object
[]
author
author:
object
author.accentColor
author.accentColor:
undefined
|number
author.avatar
author.avatar:
null
|string
author.avatarDecorationData
author.avatarDecorationData:
undefined
|object
author.banner
author.banner:
undefined
|string
author.bot
author.bot:
undefined
|boolean
author.discriminator
author.discriminator:
string
author.email
author.email:
undefined
|null
|string
author.flags
author.flags:
undefined
|number
author.globalName
author.globalName:
null
|string
author.id
author.id:
string
author.locale
author.locale:
undefined
|string
author.mfaEnabled
author.mfaEnabled:
undefined
|boolean
author.premiumType
author.premiumType:
undefined
|PremiumTypes
author.publicFlags
author.publicFlags:
undefined
|number
author.system
author.system:
undefined
|boolean
author.username
author.username:
string
author.verified
author.verified:
undefined
|boolean
call
call:
undefined
|object
channelId
channelId:
string
components
components:
undefined
| (object
|object
|object
|object
)[]
content
content:
undefined
|string
editedTimestamp
editedTimestamp:
null
|string
embeds
embeds:
object
[]
flags
flags:
undefined
|MessageFlags
guildId
guildId:
undefined
|string
id
id:
string
interaction
interaction:
undefined
|object
interactionMetadata
interactionMetadata:
undefined
|object
|object
|object
member
member:
undefined
|object
mentionChannels
mentionChannels:
undefined
|object
[]
mentionEveryone
mentionEveryone:
boolean
mentionRoles
mentionRoles:
undefined
|string
[]
mentions
mentions:
object
[]
messageReference
messageReference:
undefined
|object
messageSnapshots
messageSnapshots:
undefined
|object
[]
nonce
nonce:
undefined
|string
|number
pinned
pinned:
boolean
poll
poll:
undefined
|object
position
position:
undefined
|number
reactions
reactions:
undefined
|object
[]
referencedMessage
referencedMessage:
undefined
| { id: string; channelId: string; guildId?: string | undefined; author: { username: string; globalName: string | null; locale?: string | undefined; flags?: number | undefined; premiumType?: PremiumTypes | undefined; ... 11 more ...; avatarDecorationData?: { ...; } | undefined; }; ... 31 more ...; call?: { ...; } | un...
stickerItems
stickerItems:
undefined
|object
[]
stickers
stickers:
undefined
|object
[]
thread
thread:
undefined
|object
timestamp
timestamp:
string
tts
tts:
boolean
type
type:
MessageTypes
webhookId
webhookId:
undefined
|string
Remarks
Unlike getMessage()
, this endpoint allows the bot user to act without:
- Needing to be able to see the contents of the channel that the message is in. (
READ_MESSAGES
permission.) - Requiring the
MESSAGE_CONTENT
intent.
Does not support ephemeral follow-up messages due to these being stateless.
See
Defined in
getOwnVoiceState()
getOwnVoiceState: (
guildId
) =>Promise
<object
>
Returns the current user's voice state in the guild.
Parameters
• guildId: BigString
The ID of the guild to get the voice state from.
Returns
Promise
<object
>
An instance of DiscordVoiceState.
channelId
channelId:
null
|string
deaf
deaf:
boolean
guildId
guildId:
undefined
|string
member
member:
undefined
|object
mute
mute:
boolean
requestToSpeakTimestamp
requestToSpeakTimestamp:
null
|string
selfDeaf
selfDeaf:
boolean
selfMute
selfMute:
boolean
selfStream
selfStream:
undefined
|boolean
selfVideo
selfVideo:
boolean
sessionId
sessionId:
string
suppress
suppress:
boolean
userId
userId:
string
See
https://discord.com/developers/docs/resources/voice#get-current-user-voice-state
Defined in
getPinnedMessages()
getPinnedMessages: (
channelId
) =>Promise
<object
[]>
Gets the pinned messages for a channel.
Parameters
• channelId: BigString
The ID of the channel to get the pinned messages for.
Returns
Promise
<object
[]>
A collection of DiscordMessage objects assorted by message ID.
Remarks
Requires that the bot user be able to see the contents of the channel in which the messages were posted.
If getting a message from a guild channel:
- Requires the
READ_MESSAGE_HISTORY
permission.
See
https://discord.com/developers/docs/resources/channel#get-pinned-messages
Defined in
getPollAnswerVoters()
getPollAnswerVoters: (
channelId
,messageId
,answerId
,options
?) =>Promise
<object
>
Get a list of users that voted for this specific answer.
Parameters
• channelId: BigString
The ID of the channel in which the message with the poll lives
• messageId: BigString
The ID of the message in which the poll lives
• answerId: number
The ID of the answer to get the users that voted that answer
• options?: GetPollAnswerVotes
The options for the request
Returns
Promise
<object
>
The list of users that voted for the specific answer.
users
users:
object
[]
Defined in
getPrivateArchivedThreads()
getPrivateArchivedThreads: (
channelId
,options
?) =>Promise
<object
>
Gets the list of private archived threads for a channel.
Parameters
• channelId: BigString
The ID of the channel to get the archived threads for.
• options?: ListArchivedThreads
The parameters for the fetching of threads.
Returns
Promise
<object
>
An instance of DiscordArchivedThreads.
hasMore
hasMore:
boolean
members
members:
object
[]
threads
threads:
object
[]
Remarks
Requires the READ_MESSAGE_HISTORY
permission.
Requires the MANAGE_THREADS
permission.
Returns threads of type ChannelTypes.GuildPrivateThread.
Threads are ordered by the archive_timestamp
property included in the metadata of the object in descending order.
See
https://discord.com/developers/docs/resources/channel#list-private-archived-threads
Defined in
getPrivateJoinedArchivedThreads()
getPrivateJoinedArchivedThreads: (
channelId
,options
?) =>Promise
<object
>
Gets the list of private archived threads the bot is a member of for a channel.
Parameters
• channelId: BigString
The ID of the channel to get the archived threads for.
• options?: ListArchivedThreads
The parameters for the fetching of threads.
Returns
Promise
<object
>
An instance of DiscordArchivedThreads.
hasMore
hasMore:
boolean
members
members:
object
[]
threads
threads:
object
[]
Remarks
Requires the READ_MESSAGE_HISTORY
permission.
Returns threads of type ChannelTypes.GuildPrivateThread.
Threads are ordered by the id
property in descending order.
See
https://discord.com/developers/docs/resources/channel#list-joined-private-archived-threads
Defined in
getPruneCount()
getPruneCount: (
guildId
,options
?) =>Promise
<object
>
Gets the number of members that would be kicked from a guild during pruning.
Parameters
• guildId: BigString
The ID of the guild to get the prune count of.
• options?: GetGuildPruneCountQuery
The parameters for the fetching of the prune count.
Returns
Promise
<object
>
A number indicating the number of members that would be kicked.
pruned
pruned:
number
Remarks
Requires the MANAGE_GUILD
and KICK_MEMBERS
permissions.
See
https://discord.com/developers/docs/resources/guild#get-guild-prune-count
Defined in
getPublicArchivedThreads()
getPublicArchivedThreads: (
channelId
,options
?) =>Promise
<object
>
Gets the list of public archived threads for a channel.
Parameters
• channelId: BigString
The ID of the channel to get the archived threads for.
• options?: ListArchivedThreads
The parameters for the fetching of threads.
Returns
Promise
<object
>
An instance of DiscordArchivedThreads.
hasMore
hasMore:
boolean
members
members:
object
[]
threads
threads:
object
[]
Remarks
Requires the READ_MESSAGE_HISTORY
permission.
If called on a channel of type ChannelTypes.GuildText, returns threads of type ChannelTypes.GuildPublicThread. If called on a channel of type ChannelTypes.GuildNews, returns threads of type ChannelTypes.GuildNewsThread.
Threads are ordered by the archive_timestamp
property included in the metadata of the object in descending order.
See
https://discord.com/developers/docs/resources/channel#list-public-archived-threads
Defined in
getReactions()
getReactions: (
channelId
,messageId
,reaction
,options
?) =>Promise
<object
[]>
Gets the list of users that reacted with an emoji to a message.
Parameters
• channelId: BigString
The ID of the channel the message to get the users for is in.
• messageId: BigString
The ID of the message to get the users for.
• reaction: string
The reaction for which to get the users.
• options?: GetReactions
The parameters for the fetching of the users.
Returns
Promise
<object
[]>
A collection of DiscordUser objects assorted by user ID.
See
https://discord.com/developers/docs/resources/channel#get-reactions
Defined in
getRole()
getRole: (
guildId
,roleId
) =>Promise
<object
>
Gets a role by id for a guild.
Parameters
• guildId: BigString
The ID of the guild to get role for.
• roleId: BigString
The ID of the role.
Returns
Promise
<object
>
A DiscordRole object.
color
color:
number
flags
flags:
RoleFlags
hoist
hoist:
boolean
icon
icon:
undefined
|string
id
id:
string
managed
managed:
boolean
mentionable
mentionable:
boolean
name
name:
string
permissions
permissions:
string
position
position:
number
tags
tags:
undefined
|object
unicodeEmoji
unicodeEmoji:
undefined
|string
See
https://discord.com/developers/docs/resources/guild#get-guild-role
Defined in
getRoles()
getRoles: (
guildId
) =>Promise
<object
[]>
Gets the list of roles for a guild.
Parameters
• guildId: BigString
The ID of the guild to get the list of roles for.
Returns
Promise
<object
[]>
A collection of DiscordRole objects assorted by role ID.
Remarks
⚠️ This endpoint should be used sparingly due to DiscordRole objects already being included in guild payloads.
See
https://discord.com/developers/docs/resources/guild#get-guild-roles
Defined in
getScheduledEvent()
getScheduledEvent: (
guildId
,eventId
,options
?) =>Promise
<object
>
Gets a scheduled event by its ID.
Parameters
• guildId: BigString
The ID of the guild to get the scheduled event from.
• eventId: BigString
The ID of the scheduled event to get.
• options?
The parameters for the fetching of the scheduled event.
• options.withUserCount?: boolean
Returns
Promise
<object
>
An instance of DiscordScheduledEvent.
channelId
channelId:
null
|string
creator
creator:
undefined
|object
creatorId
creatorId:
undefined
|null
|string
description
description:
undefined
|string
entityId
entityId:
null
|string
entityMetadata
entityMetadata:
null
|object
entityType
entityType:
ScheduledEventEntityType
guildId
guildId:
string
id
id:
string
image
image:
undefined
|null
|string
name
name:
string
privacyLevel
privacyLevel:
GuildOnly
recurrenceRule
recurrenceRule:
null
|object
scheduledEndTime
scheduledEndTime:
null
|string
scheduledStartTime
scheduledStartTime:
string
status
status:
ScheduledEventStatus
userCount
userCount:
undefined
|number
See
https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event
Defined in
getScheduledEvents()
getScheduledEvents: (
guildId
,options
?) =>Promise
<object
[]>
Gets the list of scheduled events for a guild.
Parameters
• guildId: BigString
The ID of the guild to get the scheduled events from.
• options?: GetScheduledEvents
The parameters for the fetching of the scheduled events.
Returns
Promise
<object
[]>
A collection of DiscordScheduledEvent objects assorted by event ID.
See
https://discord.com/developers/docs/resources/guild-scheduled-event#list-scheduled-events-for-guild
Defined in
getScheduledEventUsers()
getScheduledEventUsers: (
guildId
,eventId
,options
?) =>Promise
<object
[]>
Gets the list of subscribers to a scheduled event from a guild.
Parameters
• guildId: BigString
The ID of the guild to get the subscribers to the scheduled event from.
• eventId: BigString
The ID of the scheduled event to get the subscribers of.
• options?: GetScheduledEventUsers
The parameters for the fetching of the subscribers.
Returns
Promise
<object
[]>
A collection of DiscordUser objects assorted by user ID.
Remarks
Requires the MANAGE_EVENTS
permission.
Users are ordered by their IDs in ascending order.
See
https://discord.com/developers/docs/resources/guild-scheduled-event#get-guild-scheduled-event-users
Defined in
getSessionInfo()
getSessionInfo: () =>
Promise
<object
>
Get the bots Gateway metadata that can help during the operation of large or sharded bots.
Returns
Promise
<object
>
sessionStartLimit
sessionStartLimit:
object
sessionStartLimit.maxConcurrency
sessionStartLimit.maxConcurrency:
number
sessionStartLimit.remaining
sessionStartLimit.remaining:
number
sessionStartLimit.resetAfter
sessionStartLimit.resetAfter:
number
sessionStartLimit.total
sessionStartLimit.total:
number
shards
shards:
number
url
url:
string
Defined in
getStageInstance()
getStageInstance: (
channelId
) =>Promise
<object
>
Gets the stage instance associated with a stage channel, if one exists.
Parameters
• channelId: BigString
The ID of the stage channel the stage instance is associated with.
Returns
Promise
<object
>
An instance of DiscordStageInstance.
channelId
channelId:
string
guildId
guildId:
string
guildScheduledEventId
guildScheduledEventId:
undefined
|string
id
id:
string
topic
topic:
string
See
https://discord.com/developers/docs/resources/stage-instance#get-stage-instance
Defined in
getSticker()
getSticker: (
stickerId
) =>Promise
<object
>
Returns a sticker object for the given sticker ID.
Parameters
• stickerId: BigString
The ID of the sticker to get
Returns
Promise
<object
>
available
available:
undefined
|boolean
description
description:
string
formatType
formatType:
StickerFormatTypes
guildId
guildId:
undefined
|string
id
id:
string
name
name:
string
packId
packId:
undefined
|string
sortValue
sortValue:
undefined
|number
tags
tags:
string
type
type:
StickerTypes
user
user:
undefined
|object
See
https://discord.com/developers/docs/resources/sticker#get-sticker
Defined in
getStickerPack()
getStickerPack: (
stickerPackId
) =>Promise
<object
>
Returns a sticker pack for the given ID.
Parameters
• stickerPackId: BigString
Returns
Promise
<object
>
A DiscordStickerPack object.
bannerAssetId
bannerAssetId:
undefined
|string
coverStickerId
coverStickerId:
undefined
|string
description
description:
string
id
id:
string
name
name:
string
skuId
skuId:
string
stickers
stickers:
object
[]
See
https://discord.com/developers/docs/resources/sticker#get-sticker-pack
Defined in
getStickerPacks()
getStickerPacks: () =>
Promise
<object
[]>
Returns the list of sticker packs available.
Returns
Promise
<object
[]>
A collection of DiscordStickerPack objects assorted by sticker ID.
See
https://discord.com/developers/docs/resources/sticker#list-sticker-packs
Defined in
getSubscription()
getSubscription: (
skuId
,subscriptionId
) =>Promise
<object
>
Get a subscription by its ID.
Parameters
• skuId: BigString
The id of the sku of get the subscriptions for
• subscriptionId: BigString
Returns
Promise
<object
>
canceledAt
canceledAt:
null
|string
country
country:
undefined
|string
currentPeriodEnd
currentPeriodEnd:
string
currentPeriodStart
currentPeriodStart:
string
entitlementIds
entitlementIds:
string
[]
id
id:
string
skuIds
skuIds:
string
[]
status
status:
DiscordSubscriptionStatus
userId
userId:
string
Defined in
getThreadMember()
getThreadMember: (
channelId
,userId
) =>Promise
<object
>
Gets a thread member by their user ID.
Parameters
• channelId: BigString
The ID of the thread to get the thread member of.
• userId: BigString
The user ID of the thread member to get.
Returns
Promise
<object
>
An instance of DiscordThreadMember.
flags
flags:
number
id
id:
string
joinTimestamp
joinTimestamp:
string
userId
userId:
string
See
https://discord.com/developers/docs/resources/channel#get-thread-member
Defined in
getThreadMembers()
getThreadMembers: (
channelId
) =>Promise
<object
[]>
Gets the list of thread members for a thread.
Parameters
• channelId: BigString
The ID of the thread to get the thread members of.
Returns
Promise
<object
[]>
A collection of DiscordThreadMember assorted by user ID.
Remarks
Requires the application to have the GUILD_MEMBERS
privileged intent enabled.
See
https://discord.com/developers/docs/resources/channel#list-thread-members
Defined in
getUser()
getUser: (
id
) =>Promise
<object
>
Get a user's data from the api
Parameters
• id: BigString
The user's id
Returns
Promise
<object
>
accentColor
accentColor:
undefined
|number
avatar
avatar:
null
|string
avatarDecorationData
avatarDecorationData:
undefined
|object
banner
banner:
undefined
|string
bot
bot:
undefined
|boolean
discriminator
discriminator:
string
email
email:
undefined
|null
|string
flags
flags:
undefined
|number
globalName
globalName:
null
|string
id
id:
string
locale
locale:
undefined
|string
mfaEnabled
mfaEnabled:
undefined
|boolean
premiumType
premiumType:
undefined
|PremiumTypes
publicFlags
publicFlags:
undefined
|number
system
system:
undefined
|boolean
username
username:
string
verified
verified:
undefined
|boolean
Defined in
getUserApplicationRoleConnection()
getUserApplicationRoleConnection: (
bearerToken
,applicationId
) =>Promise
<object
>
Get the current user application role connection for the application.
Parameters
• bearerToken: string
The access token of the user
• applicationId: BigString
The id of the application to get the role connection
Returns
Promise
<object
>
metadata
metadata:
object
platformName
platformName:
null
|string
platformUsername
platformUsername:
null
|string
Remarks
The access token requires the role_connections.write
scope.
See
https://discord.com/developers/docs/resources/user#get-user-application-role-connection
Defined in
getUserConnections()
getUserConnections: (
bearerToken
) =>Promise
<object
[]>
Get the current user connections.
Parameters
• bearerToken: string
The access token of the user
Returns
Promise
<object
[]>
Remarks
This requires the connections
scope.
Defined in
getUserVoiceState()
getUserVoiceState: (
guildId
,userId
) =>Promise
<object
>
Returns the specified user's voice state in the guild.
Parameters
• guildId: BigString
The ID of the guild to get the voice state from.
• userId: BigString
The ID of the user to get the voice state from
Returns
Promise
<object
>
An instance of DiscordVoiceState.
channelId
channelId:
null
|string
deaf
deaf:
boolean
guildId
guildId:
undefined
|string
member
member:
undefined
|object
mute
mute:
boolean
requestToSpeakTimestamp
requestToSpeakTimestamp:
null
|string
selfDeaf
selfDeaf:
boolean
selfMute
selfMute:
boolean
selfStream
selfStream:
undefined
|boolean
selfVideo
selfVideo:
boolean
sessionId
sessionId:
string
suppress
suppress:
boolean
userId
userId:
string
See
https://discord.com/developers/docs/resources/voice#get-user-voice-state
Defined in
getVanityUrl()
getVanityUrl: (
guildId
) =>Promise
<object
>
Gets information about the vanity url of a guild.
Parameters
• guildId: BigString
The ID of the guild to get the vanity url information for.
Returns
Promise
<object
>
An instance of DiscordVanityUrl.
code
code:
null
|string
uses
uses:
number
Remarks
Requires the MANAGE_GUILD
permission.
The code
property will be null
if the guild does not have a set vanity url.
See
https://discord.com/developers/docs/resources/guild#get-guild-vanity-url
Defined in
getVoiceRegions()
getVoiceRegions: (
guildId
) =>Promise
<object
[]>
Gets the list of voice regions for a guild.
Parameters
• guildId: BigString
The ID of the guild to get the voice regions for.
Returns
Promise
<object
[]>
A collection of DiscordVoiceRegion objects assorted by voice region ID.
See
https://discord.com/developers/docs/resources/guild#get-guild-voice-regions
Defined in
getWebhook()
getWebhook: (
webhookId
) =>Promise
<Camelize
<DiscordWebhook
>>
Gets a webhook by its ID.
Parameters
• webhookId: BigString
The ID of the webhook to get.
Returns
Promise
<Camelize
<DiscordWebhook
>>
An instance of DiscordWebhook.
Remarks
Requires the MANAGE_WEBHOOKS
permission unless the application making the request owns the webhook.
See
https://discord.com/developers/docs/resources/webhook#get-webhook
Defined in
getWebhookMessage()
getWebhookMessage: (
webhookId
,token
,messageId
,options
?) =>Promise
<object
>
Gets a webhook message by its ID.
Parameters
• webhookId: BigString
The ID of the webhook to get a message of.
• token: string
The webhook token, used to get webhook messages.
• messageId: BigString
the ID of the webhook message to get.
• options?: GetWebhookMessageOptions
The parameters for the fetching of the message.
Returns
Promise
<object
>
An instance of DiscordMessage.
activity
activity:
undefined
|object
application
application:
undefined
|object
applicationId
applicationId:
undefined
|string
attachments
attachments:
object
[]
author
author:
object
author.accentColor
author.accentColor:
undefined
|number
author.avatar
author.avatar:
null
|string
author.avatarDecorationData
author.avatarDecorationData:
undefined
|object
author.banner
author.banner:
undefined
|string
author.bot
author.bot:
undefined
|boolean
author.discriminator
author.discriminator:
string
author.email
author.email:
undefined
|null
|string
author.flags
author.flags:
undefined
|number
author.globalName
author.globalName:
null
|string
author.id
author.id:
string
author.locale
author.locale:
undefined
|string
author.mfaEnabled
author.mfaEnabled:
undefined
|boolean
author.premiumType
author.premiumType:
undefined
|PremiumTypes
author.publicFlags
author.publicFlags:
undefined
|number
author.system
author.system:
undefined
|boolean
author.username
author.username:
string
author.verified
author.verified:
undefined
|boolean
call
call:
undefined
|object
channelId
channelId:
string
components
components:
undefined
| (object
|object
|object
|object
)[]
content
content:
undefined
|string
editedTimestamp
editedTimestamp:
null
|string
embeds
embeds:
object
[]
flags
flags:
undefined
|MessageFlags
guildId
guildId:
undefined
|string
id
id:
string
interaction
interaction:
undefined
|object
interactionMetadata
interactionMetadata:
undefined
|object
|object
|object
member
member:
undefined
|object
mentionChannels
mentionChannels:
undefined
|object
[]
mentionEveryone
mentionEveryone:
boolean
mentionRoles
mentionRoles:
undefined
|string
[]
mentions
mentions:
object
[]
messageReference
messageReference:
undefined
|object
messageSnapshots
messageSnapshots:
undefined
|object
[]
nonce
nonce:
undefined
|string
|number
pinned
pinned:
boolean
poll
poll:
undefined
|object
position
position:
undefined
|number
reactions
reactions:
undefined
|object
[]
referencedMessage
referencedMessage:
undefined
| { id: string; channelId: string; guildId?: string | undefined; author: { username: string; globalName: string | null; locale?: string | undefined; flags?: number | undefined; premiumType?: PremiumTypes | undefined; ... 11 more ...; avatarDecorationData?: { ...; } | undefined; }; ... 31 more ...; call?: { ...; } | un...
stickerItems
stickerItems:
undefined
|object
[]
stickers
stickers:
undefined
|object
[]
thread
thread:
undefined
|object
timestamp
timestamp:
string
tts
tts:
boolean
type
type:
MessageTypes
webhookId
webhookId:
undefined
|string
See
https://discord.com/developers/docs/resources/webhook#get-webhook-message
Defined in
getWebhookWithToken()
getWebhookWithToken: (
webhookId
,token
) =>Promise
<Camelize
<DiscordWebhook
>>
Gets a webhook using the webhook token, thereby bypassing the need for authentication + permissions.
Parameters
• webhookId: BigString
The ID of the webhook to get.
• token: string
The webhook token, used to get the webhook.
Returns
Promise
<Camelize
<DiscordWebhook
>>
An instance of DiscordWebhook.
See
https://discord.com/developers/docs/resources/webhook#get-webhook-with-token
Defined in
getWelcomeScreen()
getWelcomeScreen: (
guildId
) =>Promise
<object
>
Gets the welcome screen for a guild.
Parameters
• guildId: BigString
The ID of the guild to get the welcome screen for.
Returns
Promise
<object
>
An instance of DiscordWelcomeScreen.
description
description:
null
|string
welcomeChannels
welcomeChannels:
object
[]
Remarks
If the welcome screen is not enabled:
- Requires the
MANAGE_GUILD
permission.
See
https://discord.com/developers/docs/resources/guild#get-guild-welcome-screen
Defined in
getWidget()
getWidget: (
guildId
) =>Promise
<object
>
Gets the guild widget by guild ID.
Parameters
• guildId: BigString
The ID of the guild to get the widget of.
Returns
Promise
<object
>
An instance of DiscordGuildWidget.
channels
channels:
object
[]
id
id:
string
instantInvite
instantInvite:
string
members
members:
object
[]
name
name:
string
presenceCount
presenceCount:
number
Remarks
Fires an INVITE_CREATED
Gateway event when an invite channel is defined and a new Invite
is generated.
See
https://discord.com/developers/docs/resources/guild#get-guild-widget
Defined in
getWidgetSettings()
getWidgetSettings: (
guildId
) =>Promise
<object
>
Gets the settings of a guild's widget.
Parameters
• guildId: BigString
The ID of the guild to get the widget of.
Returns
Promise
<object
>
An instance of DiscordGuildWidgetSettings.
channelId
channelId:
null
|string
enabled
enabled:
boolean
Remarks
Requires the MANAGE_GUILD
permission.
See
https://discord.com/developers/docs/resources/guild#get-guild-widget-settings
Defined in
globallyRateLimited
globallyRateLimited:
boolean
Whether or not the manager is rate limited globally across all requests. Defaults to false.
Defined in
invalidBucket
invalidBucket:
InvalidRequestBucket
The bucket for handling any invalid requests.
Defined in
isProxied
isProxied:
boolean
true
if the baseUrl
does not start with https://discord.com/api
.
Mostly used only for intern functions.
Defined in
joinThread()
joinThread: (
channelId
) =>Promise
<void
>
Adds the bot user to a thread.
Parameters
• channelId: BigString
The ID of the thread to add the bot user to.
Returns
Promise
<void
>
Remarks
Requires the thread not be archived.
Fires a Thread Members Update gateway event.
See
https://discord.com/developers/docs/resources/channel#join-thread
Defined in
kickMember()
kickMember: (
guildId
,userId
,reason
?) =>Promise
<void
>
Kicks a member from a guild.
Parameters
• guildId: BigString
The ID of the guild to kick the member from.
• userId: BigString
The user ID of the member to kick from the guild.
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<void
>
Remarks
Requires the KICK_MEMBERS
permission.
Fires a Guild Member Remove gateway event.
See
https://discord.com/developers/docs/resources/guild#remove-guild-member
Defined in
leaveGuild()
leaveGuild: (
guildId
) =>Promise
<void
>
Leaves a guild.
Parameters
• guildId: BigString
The ID of the guild to leave.
Returns
Promise
<void
>
Remarks
Fires a Guild Delete event.
See
https://discord.com/developers/docs/resources/user#leave-guild
Defined in
leaveThread()
leaveThread: (
channelId
) =>Promise
<void
>
Removes the bot user from a thread.
Parameters
• channelId: BigString
The ID of the thread to remove the bot user from.
Returns
Promise
<void
>
Remarks
Requires the thread not be archived.
Fires a Thread Members Update gateway event.
See
https://discord.com/developers/docs/resources/channel#leave-thread
Defined in
listDefaultSoundboardSounds()
listDefaultSoundboardSounds: () =>
Promise
<object
[]>
Returns an array of soundboard sound objects that can be used by all users.
Returns
Promise
<object
[]>
Defined in
listEntitlements()
listEntitlements: (
applicationId
,options
?) =>Promise
<object
[]>
Returns all entitlements for a given app, active and expired.
Parameters
• applicationId: BigString
The id of the application to get the entitlements
• options?: GetEntitlements
The optional query params for the endpoint
Returns
Promise
<object
[]>
Defined in
listGuildSoundboardSounds()
listGuildSoundboardSounds: (
guildId
) =>Promise
<object
>
Returns a list of the guild's soundboard sounds.
Parameters
• guildId: BigString
The guild to get the sounds from
Returns
Promise
<object
>
items
items:
object
[]
Remarks
Includes user
fields if the bot has the CREATE_GUILD_EXPRESSIONS
or MANAGE_GUILD_EXPRESSIONS
permission.
Defined in
listSkus()
listSkus: (
applicationId
) =>Promise
<object
[]>
Returns all SKUs for a given application
Parameters
• applicationId: BigString
The id of the application to get the SKUs
Returns
Promise
<object
[]>
Defined in
listSubscriptions()
listSubscriptions: (
skuId
,options
?) =>Promise
<object
[]>
Returns all subscriptions containing the SKU, filtered by user.
Parameters
• skuId: BigString
The id of the sku of get the subscriptions for
• options?: ListSkuSubscriptionsOptions
Returns
Promise
<object
[]>
Defined in
logger
logger:
Pick
<object
,"debug"
|"info"
|"warn"
|"error"
|"fatal"
>
The logger to use for the rest manager
Type declaration
debug()
debug: (...
args
) =>void
Parameters
• ...args: any
[]
Returns
void
error()
error: (...
args
) =>void
Parameters
• ...args: any
[]
Returns
void
fatal()
fatal: (...
args
) =>void
Parameters
• ...args: any
[]
Returns
void
info()
info: (...
args
) =>void
Parameters
• ...args: any
[]
Returns
void
log()
log: (
level
, ...args
) =>void
Parameters
• level: LogLevels
• ...args: any
[]
Returns
void
setDepth()
setDepth: (
level
) =>void
Parameters
• level: LogDepth
Returns
void
setLevel()
setLevel: (
level
) =>void
Parameters
• level: LogLevels
Returns
void
warn()
warn: (...
args
) =>void
Parameters
• ...args: any
[]
Returns
void
Defined in
makeRequest()
makeRequest: <
T
>(method
,url
,options
?) =>Promise
<T
>
Make a request to be sent to the api.
Type Parameters
• T = unknown
Parameters
• method: RequestMethods
• url: string
• options?: MakeRequestOptions
Returns
Promise
<T
>
Defined in
maxRetryCount
maxRetryCount:
number
The maximum amount of times a request should be retried. Defaults to Infinity
Defined in
modifyGuildSoundboardSound()
modifyGuildSoundboardSound: (
guildId
,soundId
,options
,reason
?) =>Promise
<object
>
Modify the given soundboard sound.
Parameters
• guildId: BigString
The guild to create the sounds in
• soundId: BigString
The sound id to update
• options: ModifyGuildSoundboardSound
The options to update the sound
• reason?: string
The audit log reason
Returns
Promise
<object
>
available
available:
boolean
emojiId
emojiId:
null
|string
emojiName
emojiName:
null
|string
guildId
guildId:
undefined
|string
name
name:
string
soundId
soundId:
string
user
user:
undefined
|object
volume
volume:
number
Remarks
Fires a Guild Soundboard Sound Update Gateway event.
For sounds created by the current user, requires either the CREATE_GUILD_EXPRESSIONS
or MANAGE_GUILD_EXPRESSIONS
permission.
For other sounds, requires the MANAGE_GUILD_EXPRESSIONS
permission.
Defined in
patch()
patch: <
T
>(url
,options
?) =>Promise
<Camelize
<T
>>
Make a patch request to the api.
Type Parameters
• T = void
Parameters
• url: string
• options?: MakeRequestOptions
Returns
Promise
<Camelize
<T
>>
Defined in
pinMessage()
pinMessage: (
channelId
,messageId
,reason
?) =>Promise
<void
>
Pins a message in a channel.
Parameters
• channelId: BigString
The ID of the channel where the message is to be pinned.
• messageId: BigString
The ID of the message to pin.
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<void
>
Remarks
Requires that the bot user be able to see the contents of the channel in which the messages were posted.
Requires the MANAGE_MESSAGES
permission.
⚠️ There can only be at max 50 messages pinned in a channel.
Fires a Channel Pins Update event.
See
https://discord.com/developers/docs/resources/channel#pin-message
Defined in
post()
post: <
T
>(url
,options
?) =>Promise
<Camelize
<T
>>
Make a post request to the api.
Type Parameters
• T = void
Parameters
• url: string
• options?: MakeRequestOptions
Returns
Promise
<Camelize
<T
>>
Defined in
preferSnakeCase()
preferSnakeCase: (
enabled
) =>RestManager
Whether or not the rest manager should keep objects in raw snake case from discord.
Parameters
• enabled: boolean
Returns
Defined in
processHeaders()
processHeaders: (
url
,headers
,identifier
) =>undefined
|string
Processes the rate limit headers and determines if it needs to be rate limited and returns the bucket id if available
Parameters
• url: string
• headers: Headers
• identifier: string
Returns
undefined
| string
Defined in
processingRateLimitedPaths
processingRateLimitedPaths:
boolean
Whether or not the rate limited paths are being processed to allow requests to be made once time is up. Defaults to false.
Defined in
processRateLimitedPaths()
processRateLimitedPaths: () =>
void
This will create a infinite loop running in 1 seconds using tail recursion to keep rate limits clean. When a rate limit resets, this will remove it so the queue can proceed.
Returns
void
Defined in
processRequest()
processRequest: (
request
) =>Promise
<void
>
Takes a request and processes it into a queue.
Parameters
• request: SendRequestOptions
Returns
Promise
<void
>
Defined in
pruneMembers()
pruneMembers: (
guildId
,options
,reason
?) =>Promise
<object
>
Initiates the process of pruning inactive members.
Parameters
• guildId: BigString
The ID of the guild to prune the members of.
• options: BeginGuildPrune
The parameters for the pruning of members.
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<object
>
A number indicating how many members were pruned.
pruned
pruned:
null
|number
Remarks
Requires the MANAGE_GUILD
and KICK_MEMBERS
permissions.
❗ Requests to this endpoint will time out for large guilds. To prevent this from happening, set the BeginGuildPrune.computePruneCount property of the options object parameter to false
. This will begin the process of pruning, and immediately return undefined
, rather than wait for the process to complete before returning the actual count of members that have been kicked.
⚠️ By default, this process will not remove members with a role. To include the members who have a particular subset of roles, specify the role(s) in the includeRoles property of the options object parameter.
Fires a Guild Member Remove gateway event for every member kicked.
See
https://discord.com/developers/docs/resources/guild#begin-guild-prune
Defined in
publishMessage()
publishMessage: (
channelId
,messageId
) =>Promise
<object
>
Cross-posts a message posted in an announcement channel to subscribed channels.
Parameters
• channelId: BigString
The ID of the announcement channel.
• messageId: BigString
The ID of the message to cross-post.
Returns
Promise
<object
>
An instance of the cross-posted DiscordMessage.
activity
activity:
undefined
|object
application
application:
undefined
|object
applicationId
applicationId:
undefined
|string
attachments
attachments:
object
[]
author
author:
object
author.accentColor
author.accentColor:
undefined
|number
author.avatar
author.avatar:
null
|string
author.avatarDecorationData
author.avatarDecorationData:
undefined
|object
author.banner
author.banner:
undefined
|string
author.bot
author.bot:
undefined
|boolean
author.discriminator
author.discriminator:
string
author.email
author.email:
undefined
|null
|string
author.flags
author.flags:
undefined
|number
author.globalName
author.globalName:
null
|string
author.id
author.id:
string
author.locale
author.locale:
undefined
|string
author.mfaEnabled
author.mfaEnabled:
undefined
|boolean
author.premiumType
author.premiumType:
undefined
|PremiumTypes
author.publicFlags
author.publicFlags:
undefined
|number
author.system
author.system:
undefined
|boolean
author.username
author.username:
string
author.verified
author.verified:
undefined
|boolean
call
call:
undefined
|object
channelId
channelId:
string
components
components:
undefined
| (object
|object
|object
|object
)[]
content
content:
undefined
|string
editedTimestamp
editedTimestamp:
null
|string
embeds
embeds:
object
[]
flags
flags:
undefined
|MessageFlags
guildId
guildId:
undefined
|string
id
id:
string
interaction
interaction:
undefined
|object
interactionMetadata
interactionMetadata:
undefined
|object
|object
|object
member
member:
undefined
|object
mentionChannels
mentionChannels:
undefined
|object
[]
mentionEveryone
mentionEveryone:
boolean
mentionRoles
mentionRoles:
undefined
|string
[]
mentions
mentions:
object
[]
messageReference
messageReference:
undefined
|object
messageSnapshots
messageSnapshots:
undefined
|object
[]
nonce
nonce:
undefined
|string
|number
pinned
pinned:
boolean
poll
poll:
undefined
|object
position
position:
undefined
|number
reactions
reactions:
undefined
|object
[]
referencedMessage
referencedMessage:
undefined
| { id: string; channelId: string; guildId?: string | undefined; author: { username: string; globalName: string | null; locale?: string | undefined; flags?: number | undefined; premiumType?: PremiumTypes | undefined; ... 11 more ...; avatarDecorationData?: { ...; } | undefined; }; ... 31 more ...; call?: { ...; } | un...
stickerItems
stickerItems:
undefined
|object
[]
stickers
stickers:
undefined
|object
[]
thread
thread:
undefined
|object
timestamp
timestamp:
string
tts
tts:
boolean
type
type:
MessageTypes
webhookId
webhookId:
undefined
|string
Remarks
Requires the SEND_MESSAGES
permission.
If not cross-posting own message:
- Requires the
MANAGE_MESSAGES
permission.
Fires a Message Create event in the guilds the subscribed channels are in.
See
https://discord.com/developers/docs/resources/channel#crosspost-message
Defined in
put()
put: <
T
>(url
,options
?) =>Promise
<Camelize
<T
>>
Make a put request to the api.
Type Parameters
• T = void
Parameters
• url: string
• options?: MakeRequestOptions
Returns
Promise
<Camelize
<T
>>
Defined in
queues
queues:
Map
<string
,Queue
>
The queues that hold all the requests to be processed.
Defined in
rateLimitedPaths
rateLimitedPaths:
Map
<string
,RestRateLimitedPath
>
The paths that are currently rate limited.
Defined in
removeDmRecipient()
removeDmRecipient: (
channelId
,userId
) =>Promise
<void
>
Removes a member from a Group DM.
Parameters
• channelId: BigString
The ID of the channel to remove the recipient user of.
• userId: BigString
The user ID of the user to remove.
Returns
Promise
<void
>
See
https://discord.com/developers/docs/resources/channel#group-dm-remove-recipient
Defined in
removeRole()
removeRole: (
guildId
,userId
,roleId
,reason
?) =>Promise
<void
>
Removes a role from a member.
Parameters
• guildId: BigString
The ID of the guild the member to remove the role from is in.
• userId: BigString
The user ID of the member to remove the role from.
• roleId: BigString
The ID of the role to remove from the member.
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<void
>
Remarks
Requires the MANAGE_ROLES
permission.
Fires a Guild Member Update gateway event.
See
https://discord.com/developers/docs/resources/guild#remove-guild-member-role
Defined in
removeThreadMember()
removeThreadMember: (
channelId
,userId
) =>Promise
<void
>
Removes a member from a thread.
Parameters
• channelId: BigString
The ID of the thread to remove the thread member of.
• userId: BigString
The user ID of the thread member to remove.
Returns
Promise
<void
>
Remarks
If the thread is of type ChannelTypes.GuildPrivateThread, requires to be the creator of the thread.
Otherwise, requires the MANAGE_THREADS
permission.
Requires the thread not be archived.
Fires a Thread Members Update gateway event.
See
https://discord.com/developers/docs/resources/channel#remove-thread-member
Defined in
revokeToken()
revokeToken: (
clientId
,clientSecret
,options
) =>Promise
<void
>
Revoke an access_token
Parameters
• clientId: BigString
Application's client id
• clientSecret: string
application's client secret
• options
The options to revoke the access_token
• options.token: string
• options.tokenTypeHint: undefined
| "access_token"
| "refresh_token"
Returns
Promise
<void
>
Defined in
routes
routes:
RestRoutes
The routes that are available for this manager.
Defined in
searchMembers()
searchMembers: (
guildId
,query
,options
?) =>Promise
<object
[]>
Gets the list of members whose usernames or nicknames start with a provided string.
Parameters
• guildId: BigString
The ID of the guild to search in.
• query: string
The string to match usernames or nicknames against.
• options?: Omit
<SearchMembers
, "query"
>
The parameters for searching through the members.
Returns
Promise
<object
[]>
A collection of DiscordMember objects assorted by user ID.
See
https://discord.com/developers/docs/resources/guild#search-guild-members
Defined in
sendFollowupMessage()
sendFollowupMessage: (
token
,options
) =>Promise
<object
>
Sends a follow-up message to an interaction.
Parameters
• token: string
The interaction token to use, provided in the original interaction.
• options: InteractionCallbackData
The parameters for the creation of the message.
Returns
Promise
<object
>
An instance of the created DiscordMessage.
activity
activity:
undefined
|object
application
application:
undefined
|object
applicationId
applicationId:
undefined
|string
attachments
attachments:
object
[]
author
author:
object
author.accentColor
author.accentColor:
undefined
|number
author.avatar
author.avatar:
null
|string
author.avatarDecorationData
author.avatarDecorationData:
undefined
|object
author.banner
author.banner:
undefined
|string
author.bot
author.bot:
undefined
|boolean
author.discriminator
author.discriminator:
string
author.email
author.email:
undefined
|null
|string
author.flags
author.flags:
undefined
|number
author.globalName
author.globalName:
null
|string
author.id
author.id:
string
author.locale
author.locale:
undefined
|string
author.mfaEnabled
author.mfaEnabled:
undefined
|boolean
author.premiumType
author.premiumType:
undefined
|PremiumTypes
author.publicFlags
author.publicFlags:
undefined
|number
author.system
author.system:
undefined
|boolean
author.username
author.username:
string
author.verified
author.verified:
undefined
|boolean
call
call:
undefined
|object
channelId
channelId:
string
components
components:
undefined
| (object
|object
|object
|object
)[]
content
content:
undefined
|string
editedTimestamp
editedTimestamp:
null
|string
embeds
embeds:
object
[]
flags
flags:
undefined
|MessageFlags
guildId
guildId:
undefined
|string
id
id:
string
interaction
interaction:
undefined
|object
interactionMetadata
interactionMetadata:
undefined
|object
|object
|object
member
member:
undefined
|object
mentionChannels
mentionChannels:
undefined
|object
[]
mentionEveryone
mentionEveryone:
boolean
mentionRoles
mentionRoles:
undefined
|string
[]
mentions
mentions:
object
[]
messageReference
messageReference:
undefined
|object
messageSnapshots
messageSnapshots:
undefined
|object
[]
nonce
nonce:
undefined
|string
|number
pinned
pinned:
boolean
poll
poll:
undefined
|object
position
position:
undefined
|number
reactions
reactions:
undefined
|object
[]
referencedMessage
referencedMessage:
undefined
| { id: string; channelId: string; guildId?: string | undefined; author: { username: string; globalName: string | null; locale?: string | undefined; flags?: number | undefined; premiumType?: PremiumTypes | undefined; ... 11 more ...; avatarDecorationData?: { ...; } | undefined; }; ... 31 more ...; call?: { ...; } | un...
stickerItems
stickerItems:
undefined
|object
[]
stickers
stickers:
undefined
|object
[]
thread
thread:
undefined
|object
timestamp
timestamp:
string
tts
tts:
boolean
type
type:
MessageTypes
webhookId
webhookId:
undefined
|string
Remarks
⚠️ Interaction tokens are only valid for 15 minutes.
By default, mentions are suppressed. To enable mentions, pass a mention object with the callback data.
Unlike sendMessage()
, this endpoint allows the bot user to act without:
- Needing to be able to see the contents of the channel that the message is in. (
READ_MESSAGES
permission.) - Requiring the
MESSAGE_CONTENT
intent.
Apps are limited to 5 followup messages per interaction if it was initiated from a user-installed app and isn't installed in the server You can check if it was initiated from a user-installed app that isn't installed in the server by checking if DiscordInteraction.authorizing_integration_owners | authorizingIntegrationOwners only contains DiscordApplicationIntegrationType.UserInstall | UserInstall.
Fires a Message Create event.
See
https://discord.com/developers/docs/interactions/receiving-and-responding#create-followup-message
Defined in
sendInteractionResponse()
sendInteractionResponse: (
interactionId
,token
,options
,params
?) =>Promise
<void
|object
>
Sends a response to an interaction.
Parameters
• interactionId: BigString
The ID of the interaction to respond to.
• token: string
The interaction token to use, provided in the original interaction.
• options: InteractionResponse
The parameters for the creation of the message.
• params?: InteractionCallbackOptions
The query parameters for the response of the callback
Returns
Promise
<void
| object
>
Nothing or the DiscordInteractionCallbackResponse if withResponse param is true
Remarks
⚠️ Interaction tokens are only valid for 15 minutes.
By default, mentions are suppressed. To enable mentions, pass a mention object with the callback data.
Unlike sendMessage()
, this endpoint allows the bot user to act without:
- Needing to be able to see the contents of the channel that the message is in. (
READ_MESSAGES
permission.) - Requiring the
MESSAGE_CONTENT
intent.
Fires a Message Create event.
See
Defined in
sendMessage()
sendMessage: (
channelId
,options
) =>Promise
<object
>
Sends a message to a channel.
Parameters
• channelId: BigString
The ID of the channel to send the message in.
• options: CreateMessageOptions
The parameters for the creation of the message.
Returns
Promise
<object
>
An instance of the created DiscordMessage.
activity
activity:
undefined
|object
application
application:
undefined
|object
applicationId
applicationId:
undefined
|string
attachments
attachments:
object
[]
author
author:
object
author.accentColor
author.accentColor:
undefined
|number
author.avatar
author.avatar:
null
|string
author.avatarDecorationData
author.avatarDecorationData:
undefined
|object
author.banner
author.banner:
undefined
|string
author.bot
author.bot:
undefined
|boolean
author.discriminator
author.discriminator:
string
author.email
author.email:
undefined
|null
|string
author.flags
author.flags:
undefined
|number
author.globalName
author.globalName:
null
|string
author.id
author.id:
string
author.locale
author.locale:
undefined
|string
author.mfaEnabled
author.mfaEnabled:
undefined
|boolean
author.premiumType
author.premiumType:
undefined
|PremiumTypes
author.publicFlags
author.publicFlags:
undefined
|number
author.system
author.system:
undefined
|boolean
author.username
author.username:
string
author.verified
author.verified:
undefined
|boolean
call
call:
undefined
|object
channelId
channelId:
string
components
components:
undefined
| (object
|object
|object
|object
)[]
content
content:
undefined
|string
editedTimestamp
editedTimestamp:
null
|string
embeds
embeds:
object
[]
flags
flags:
undefined
|MessageFlags
guildId
guildId:
undefined
|string
id
id:
string
interaction
interaction:
undefined
|object
interactionMetadata
interactionMetadata:
undefined
|object
|object
|object
member
member:
undefined
|object
mentionChannels
mentionChannels:
undefined
|object
[]
mentionEveryone
mentionEveryone:
boolean
mentionRoles
mentionRoles:
undefined
|string
[]
mentions
mentions:
object
[]
messageReference
messageReference:
undefined
|object
messageSnapshots
messageSnapshots:
undefined
|object
[]
nonce
nonce:
undefined
|string
|number
pinned
pinned:
boolean
poll
poll:
undefined
|object
position
position:
undefined
|number
reactions
reactions:
undefined
|object
[]
referencedMessage
referencedMessage:
undefined
| { id: string; channelId: string; guildId?: string | undefined; author: { username: string; globalName: string | null; locale?: string | undefined; flags?: number | undefined; premiumType?: PremiumTypes | undefined; ... 11 more ...; avatarDecorationData?: { ...; } | undefined; }; ... 31 more ...; call?: { ...; } | un...
stickerItems
stickerItems:
undefined
|object
[]
stickers
stickers:
undefined
|object
[]
thread
thread:
undefined
|object
timestamp
timestamp:
string
tts
tts:
boolean
type
type:
MessageTypes
webhookId
webhookId:
undefined
|string
Remarks
Requires that the bot user be able to see the contents of the channel the message is to be sent in.
If sending a message to a guild channel:
- Requires the
SEND_MESSAGES
permission.
If sending a TTS message:
- Requires the
SEND_TTS_MESSAGES
permission.
If sending a message as a reply to another message:
- Requires the
READ_MESSAGE_HISTORY
permission. - The message being replied to cannot be a system message.
⚠️ The maximum size of a request (accounting for any attachments and message content) for bot users is 8 MiB.
Fires a Message Create gateway event.
See
https://discord.com/developers/docs/resources/channel#create-message
Defined in
sendRequest()
sendRequest: (
options
) =>Promise
<void
>
Sends a request to the api.
Parameters
• options: SendRequestOptions
Returns
Promise
<void
>
Defined in
sendSoundboardSound()
sendSoundboardSound: (
channelId
,options
) =>Promise
<void
>
Send a soundboard sound to a voice channel the user is connected to.
Parameters
• channelId: BigString
The id of the voice channel
• options: SendSoundboardSound
Returns
Promise
<void
>
Remarks
Fires a Voice Channel Effect Send Gateway event.
Requires the SPEAK
and USE_SOUNDBOARD
permissions, and also the USE_EXTERNAL_SOUNDS
permission if the sound is from a different server.
Additionally, requires the user to be connected to the voice channel, having a voice state without deaf
, self_deaf
, mute
, or suppress
enabled.
Defined in
simplifyUrl()
simplifyUrl: (
url
,method
) =>string
Split a url to separate rate limit buckets based on major/minor parameters.
Parameters
• url: string
• method: RequestMethods
Returns
string
Defined in
startThreadWithMessage()
startThreadWithMessage: (
channelId
,messageId
,options
,reason
?) =>Promise
<object
>
Creates a thread, using an existing message as its point of origin.
Parameters
• channelId: BigString
The ID of the channel in which to create the thread.
• messageId: BigString
The ID of the message to use as the thread's point of origin.
• options: StartThreadWithMessage
The parameters to use for the creation of the thread.
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<object
>
An instance of the created DiscordChannel.
applicationId
applicationId:
undefined
|string
appliedTags
appliedTags:
undefined
|string
[]
availableTags
availableTags:
undefined
|object
[]
bitrate
bitrate:
undefined
|number
defaultAutoArchiveDuration
defaultAutoArchiveDuration:
undefined
|number
defaultForumLayout
defaultForumLayout:
undefined
|ForumLayout
defaultReactionEmoji
defaultReactionEmoji:
undefined
|null
|object
defaultSortOrder
defaultSortOrder:
undefined
|null
|SortOrderTypes
defaultThreadRateLimitPerUser
defaultThreadRateLimitPerUser:
undefined
|number
flags
flags:
undefined
|ChannelFlags
guildId
guildId:
undefined
|string
icon
icon:
undefined
|string
id
id:
string
lastMessageId
lastMessageId:
undefined
|null
|string
lastPinTimestamp
lastPinTimestamp:
undefined
|null
|string
managed
managed:
undefined
|boolean
member
member:
undefined
|object
memberCount
memberCount:
undefined
|number
messageCount
messageCount:
undefined
|number
name
name:
undefined
|string
newlyCreated
newlyCreated:
undefined
|boolean
nsfw
nsfw:
undefined
|boolean
ownerId
ownerId:
undefined
|string
parentId
parentId:
undefined
|null
|string
permissionOverwrites
permissionOverwrites:
undefined
|object
[]
permissions
permissions:
undefined
|string
position
position:
undefined
|number
rateLimitPerUser
rateLimitPerUser:
undefined
|number
recipients
recipients:
undefined
|object
[]
rtcRegion
rtcRegion:
undefined
|null
|string
threadMetadata
threadMetadata:
undefined
|object
topic
topic:
undefined
|null
|string
totalMessageSent
totalMessageSent:
undefined
|number
type
type:
ChannelTypes
userLimit
userLimit:
undefined
|number
videoQualityMode
videoQualityMode:
undefined
|VideoQualityModes
Remarks
If called on a channel of type ChannelTypes.GuildText, creates a ChannelTypes.GuildPublicThread. If called on a channel of type ChannelTypes.GuildNews, creates a ChannelTypes.GuildNewsThread. Does not work on channels of type ChannelTypes.GuildForum.
The ID of the created thread will be the same as the ID of the source message.
Fires a Thread Create gateway event.
See
https://discord.com/developers/docs/resources/channel#start-thread-from-message
Defined in
startThreadWithoutMessage()
startThreadWithoutMessage: (
channelId
,options
,reason
?) =>Promise
<object
>
Creates a thread without using a message as the thread's point of origin.
Parameters
• channelId: BigString
The ID of the channel in which to create the thread.
• options: StartThreadWithoutMessage
The parameters to use for the creation of the thread.
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<object
>
An instance of the created Thread.
applicationId
applicationId:
undefined
|string
appliedTags
appliedTags:
undefined
|string
[]
availableTags
availableTags:
undefined
|object
[]
bitrate
bitrate:
undefined
|number
defaultAutoArchiveDuration
defaultAutoArchiveDuration:
undefined
|number
defaultForumLayout
defaultForumLayout:
undefined
|ForumLayout
defaultReactionEmoji
defaultReactionEmoji:
undefined
|null
|object
defaultSortOrder
defaultSortOrder:
undefined
|null
|SortOrderTypes
defaultThreadRateLimitPerUser
defaultThreadRateLimitPerUser:
undefined
|number
flags
flags:
undefined
|ChannelFlags
guildId
guildId:
undefined
|string
icon
icon:
undefined
|string
id
id:
string
lastMessageId
lastMessageId:
undefined
|null
|string
lastPinTimestamp
lastPinTimestamp:
undefined
|null
|string
managed
managed:
undefined
|boolean
member
member:
undefined
|object
memberCount
memberCount:
undefined
|number
messageCount
messageCount:
undefined
|number
name
name:
undefined
|string
newlyCreated
newlyCreated:
undefined
|boolean
nsfw
nsfw:
undefined
|boolean
ownerId
ownerId:
undefined
|string
parentId
parentId:
undefined
|null
|string
permissionOverwrites
permissionOverwrites:
undefined
|object
[]
permissions
permissions:
undefined
|string
position
position:
undefined
|number
rateLimitPerUser
rateLimitPerUser:
undefined
|number
recipients
recipients:
undefined
|object
[]
rtcRegion
rtcRegion:
undefined
|null
|string
threadMetadata
threadMetadata:
undefined
|object
topic
topic:
undefined
|null
|string
totalMessageSent
totalMessageSent:
undefined
|number
type
type:
ChannelTypes
userLimit
userLimit:
undefined
|number
videoQualityMode
videoQualityMode:
undefined
|VideoQualityModes
Remarks
Creating a private thread requires the server to be boosted.
Fires a Thread Create gateway event.
See
https://discord.com/developers/docs/resources/channel#start-thread-without-message
Defined in
syncGuildTemplate()
syncGuildTemplate: (
guildId
) =>Promise
<object
>
Synchronises a template with the current state of a guild.
Parameters
• guildId: BigString
The ID of the guild to synchronise a template of.
Returns
Promise
<object
>
An instance of the edited DiscordTemplate.
code
code:
string
createdAt
createdAt:
string
creator
creator:
object
creator.accentColor
creator.accentColor:
undefined
|number
creator.avatar
creator.avatar:
null
|string
creator.avatarDecorationData
creator.avatarDecorationData:
undefined
|object
creator.banner
creator.banner:
undefined
|string
creator.bot
creator.bot:
undefined
|boolean
creator.discriminator
creator.discriminator:
string
creator.email
creator.email:
undefined
|null
|string
creator.flags
creator.flags:
undefined
|number
creator.globalName
creator.globalName:
null
|string
creator.id
creator.id:
string
creator.locale
creator.locale:
undefined
|string
creator.mfaEnabled
creator.mfaEnabled:
undefined
|boolean
creator.premiumType
creator.premiumType:
undefined
|PremiumTypes
creator.publicFlags
creator.publicFlags:
undefined
|number
creator.system
creator.system:
undefined
|boolean
creator.username
creator.username:
string
creator.verified
creator.verified:
undefined
|boolean
creatorId
creatorId:
string
description
description:
null
|string
isDirty
isDirty:
null
|boolean
name
name:
string
serializedSourceGuild
serializedSourceGuild:
object
serializedSourceGuild.afkChannelId
serializedSourceGuild.afkChannelId:
null
|number
serializedSourceGuild.afkTimeout
serializedSourceGuild.afkTimeout:
number
serializedSourceGuild.applicationId
serializedSourceGuild.applicationId:
undefined
|null
|string
serializedSourceGuild.approximateMemberCount
serializedSourceGuild.approximateMemberCount:
undefined
|number
serializedSourceGuild.approximatePresenceCount
serializedSourceGuild.approximatePresenceCount:
undefined
|number
serializedSourceGuild.banner
serializedSourceGuild.banner:
undefined
|null
|string
serializedSourceGuild.channels
serializedSourceGuild.channels:
object
[]
serializedSourceGuild.defaultMessageNotifications
serializedSourceGuild.defaultMessageNotifications:
DefaultMessageNotificationLevels
serializedSourceGuild.description
serializedSourceGuild.description:
null
|string
serializedSourceGuild.discoverySplash
serializedSourceGuild.discoverySplash:
undefined
|null
|string
serializedSourceGuild.emojis
serializedSourceGuild.emojis:
undefined
|object
[]
serializedSourceGuild.explicitContentFilter
serializedSourceGuild.explicitContentFilter:
ExplicitContentFilterLevels
serializedSourceGuild.features
serializedSourceGuild.features:
undefined
|GuildFeatures
[]
serializedSourceGuild.icon
serializedSourceGuild.icon:
undefined
|null
|string
serializedSourceGuild.iconHash
serializedSourceGuild.iconHash:
undefined
|null
|string
serializedSourceGuild.id
serializedSourceGuild.id:
undefined
|string
serializedSourceGuild.joinedAt
serializedSourceGuild.joinedAt:
undefined
|string
serializedSourceGuild.large
serializedSourceGuild.large:
undefined
|boolean
serializedSourceGuild.maxMembers
serializedSourceGuild.maxMembers:
undefined
|number
serializedSourceGuild.maxPresences
serializedSourceGuild.maxPresences:
undefined
|null
|number
serializedSourceGuild.maxStageVideoChannelUsers
serializedSourceGuild.maxStageVideoChannelUsers:
undefined
|number
serializedSourceGuild.maxVideoChannelUsers
serializedSourceGuild.maxVideoChannelUsers:
undefined
|number
serializedSourceGuild.memberCount
serializedSourceGuild.memberCount:
undefined
|number
serializedSourceGuild.members
serializedSourceGuild.members:
undefined
|object
[]
serializedSourceGuild.mfaLevel
serializedSourceGuild.mfaLevel:
undefined
|MfaLevels
serializedSourceGuild.name
serializedSourceGuild.name:
string
serializedSourceGuild.nsfwLevel
serializedSourceGuild.nsfwLevel:
undefined
|GuildNsfwLevel
serializedSourceGuild.owner
serializedSourceGuild.owner:
undefined
|boolean
serializedSourceGuild.ownerId
serializedSourceGuild.ownerId:
undefined
|string
serializedSourceGuild.permissions
serializedSourceGuild.permissions:
undefined
|string
serializedSourceGuild.preferredLocale
serializedSourceGuild.preferredLocale:
string
serializedSourceGuild.premiumProgressBarEnabled
serializedSourceGuild.premiumProgressBarEnabled:
undefined
|boolean
serializedSourceGuild.premiumSubscriptionCount
serializedSourceGuild.premiumSubscriptionCount:
undefined
|number
serializedSourceGuild.premiumTier
serializedSourceGuild.premiumTier:
undefined
|PremiumTiers
serializedSourceGuild.presences
serializedSourceGuild.presences:
undefined
|object
[]
serializedSourceGuild.publicUpdatesChannelId
serializedSourceGuild.publicUpdatesChannelId:
undefined
|null
|string
serializedSourceGuild.roles
serializedSourceGuild.roles:
object
[]
serializedSourceGuild.rulesChannelId
serializedSourceGuild.rulesChannelId:
undefined
|null
|string
serializedSourceGuild.safetyAlertsChannelId
serializedSourceGuild.safetyAlertsChannelId:
undefined
|null
|string
serializedSourceGuild.soundboardSounds
serializedSourceGuild.soundboardSounds:
undefined
|object
[]
serializedSourceGuild.splash
serializedSourceGuild.splash:
undefined
|null
|string
serializedSourceGuild.stageInstances
serializedSourceGuild.stageInstances:
undefined
|object
[]
serializedSourceGuild.stickers
serializedSourceGuild.stickers:
undefined
|object
[]
serializedSourceGuild.systemChannelFlags
serializedSourceGuild.systemChannelFlags:
SystemChannelFlags
serializedSourceGuild.systemChannelId
serializedSourceGuild.systemChannelId:
null
|number
serializedSourceGuild.threads
serializedSourceGuild.threads:
undefined
|object
[]
serializedSourceGuild.unavailable
serializedSourceGuild.unavailable:
undefined
|boolean
serializedSourceGuild.vanityUrlCode
serializedSourceGuild.vanityUrlCode:
undefined
|null
|string
serializedSourceGuild.verificationLevel
serializedSourceGuild.verificationLevel:
VerificationLevels
serializedSourceGuild.voiceStates
serializedSourceGuild.voiceStates:
undefined
|object
[]
serializedSourceGuild.welcomeScreen
serializedSourceGuild.welcomeScreen:
undefined
|object
serializedSourceGuild.widgetChannelId
serializedSourceGuild.widgetChannelId:
undefined
|null
|string
serializedSourceGuild.widgetEnabled
serializedSourceGuild.widgetEnabled:
undefined
|boolean
sourceGuildId
sourceGuildId:
string
updatedAt
updatedAt:
string
usageCount
usageCount:
number
Remarks
Requires the MANAGE_GUILD
permission.
Fires a Guild Update gateway event.
See
https://discord.com/developers/docs/resources/guild-template#get-guild-templates
Defined in
token
token:
string
The bot token which will be used to make requests.
Defined in
triggerTypingIndicator()
triggerTypingIndicator: (
channelId
) =>Promise
<void
>
Triggers a typing indicator for the specified channel, which expires after 10 seconds.
Parameters
• channelId: BigString
The ID of the channel in which to trigger the typing indicator.
Returns
Promise
<void
>
Remarks
Generally bots should not use this route. However, if a bot is responding to a command and expects the computation to take a few seconds, this endpoint may be called to let the user know that the bot is processing their message.
Fires a Typing Start gateway event.
See
https://discord.com/developers/docs/resources/channel#trigger-typing-indicator
Defined in
unbanMember()
unbanMember: (
guildId
,userId
,reason
?) =>Promise
<void
>
Unbans a user from a guild.
Parameters
• guildId: BigString
The ID of the guild to unban the user in.
• userId: BigString
The ID of the user to unban.
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<void
>
Remarks
Requires the BAN_MEMBERS
permission.
Fires a Guild Ban Remove gateway event.
See
https://discord.com/developers/docs/resources/guild#remove-guild-ban
Defined in
unpinMessage()
unpinMessage: (
channelId
,messageId
,reason
?) =>Promise
<void
>
Unpins a pinned message in a channel.
Parameters
• channelId: BigString
The ID of the channel where the message is pinned.
• messageId: BigString
The ID of the message to unpin.
• reason?: string
An optional reason for the action, to be included in the audit log.
Returns
Promise
<void
>
Remarks
Requires that the bot user be able to see the contents of the channel in which the messages were posted.
Requires the MANAGE_MESSAGES
permission.
Fires a Channel Pins Update event.
See
https://discord.com/developers/docs/resources/channel#unpin-message
Defined in
updateBearerTokenEndpoint?
optional
updateBearerTokenEndpoint:string
The endpoint to use for updateTokenQueues
when working with a rest proxy
Defined in
updateTokenQueues()
updateTokenQueues: (
oldToken
,newToken
) =>Promise
<void
>
Parameters
• oldToken: string
• newToken: string
Returns
Promise
<void
>
Defined in
upsertGlobalApplicationCommands()
upsertGlobalApplicationCommands: (
commands
,options
?) =>Promise
<object
[]>
Re-registers the list of global application commands, overwriting the previous commands completely.
Parameters
• commands: CreateApplicationCommand
[]
The list of commands to use to overwrite the previous list.
• options?: UpsertGlobalApplicationCommandOptions
Additional options for the endpoint.
Returns
Promise
<object
[]>
A collection of DiscordApplicationCommand objects assorted by command ID.
Remarks
❗ Commands that are not present in the commands
array will be deleted.
⚠️ Commands that do not already exist will count towards the daily limit of 200 new commands.
When using the bearer token the token needs the applications.commands.update
scope and must be a Client grant
token.
You will be able to update only your own application commands
See
Defined in
upsertGuildApplicationCommands()
upsertGuildApplicationCommands: (
guildId
,commands
,options
?) =>Promise
<object
[]>
Re-registers the list of application commands registered in a guild, overwriting the previous commands completely.
Parameters
• guildId: BigString
The ID of the guild whose list of commands to overwrite.
• commands: CreateApplicationCommand
[]
The list of commands to use to overwrite the previous list.
• options?: UpsertGuildApplicationCommandOptions
Additional options for the endpoint.
Returns
Promise
<object
[]>
A collection of DiscordApplicationCommand objects assorted by command ID.
Remarks
❗ Commands that are not present in the commands
array will be deleted.
⚠️ Commands that do not already exist will count towards the daily limit of 200 new commands.
When using the bearer token the token needs the applications.commands.update
scope and must be a Client grant
token.
You will be able to update only your own application commands
See
Defined in
version
version:
ApiVersions
The api version to use when making requests. Only the latest supported version will be tested.