Skip to main content

RestRoutes

@discordeno/restDocs


Documentation / @discordeno/rest / RestRoutes

Interface: RestRoutes

Properties

application()

application: () => string

Route to get and edit information about the current application.

Returns

string

Defined in

rest/src/typings/routes.ts:301


applicationActivityInstance()

applicationActivityInstance: (applicationId, instanceId) => string

Route for get an activity instance

Parameters

applicationId: BigString

instanceId: string

Returns

string

Defined in

rest/src/typings/routes.ts:303


applicationEmoji()

applicationEmoji: (applicationId, emojiId) => string

Route to get / edit / delete an application emoji

Parameters

applicationId: BigString

emojiId: BigString

Returns

string

Defined in

rest/src/typings/routes.ts:297


applicationEmojis()

applicationEmojis: (applicationId) => string

Route to list / create an application emoji

Parameters

applicationId: BigString

Returns

string

Defined in

rest/src/typings/routes.ts:295


channels

channels: object

Routes for channel related endpoints.

bulk()

bulk: (channelId) => string

Route for handling bulk messages in a channel.

Parameters

channelId: BigString

Returns

string

channel()

channel: (channelId) => string

Route for a specific channel.

Parameters

channelId: BigString

Returns

string

crosspost()

crosspost: (channelId, messageId) => string

Route for handling crossposting a specific message.

Parameters

channelId: BigString

messageId: BigString

Returns

string

dm()

dm: () => string

Route for non-specific dm channel.

Returns

string

dmRecipient()

dmRecipient: (channelId, userId) => string

Route to add a user to an exiting group DM, requires an access token with the OAuth2 gdm.join scope

Parameters

channelId: BigString

userId: BigString

Returns

string

follow()

follow: (channelId) => string

Route for following a specific channel.

Parameters

channelId: BigString

Returns

string

forum()

forum: (channelId) => string

Route for managing a forum with a message.

Parameters

channelId: BigString

Returns

string

invites()

invites: (channelId) => string

Route for a specific channel's invites.

Parameters

channelId: BigString

Returns

string

message()

message: (channelId, id) => string

Route for a specific message

Parameters

channelId: BigString

id: BigString

Returns

string

messages()

messages: (channelId, options?) => string

Route for handling non-specific messages.

Parameters

channelId: BigString

options?: GetMessagesOptions

Returns

string

overwrite()

overwrite: (channelId, overwriteId) => string

Route for handling a specific overwrite.

Parameters

channelId: BigString

overwriteId: BigString

Returns

string

pin()

pin: (channelId, messageId) => string

Route for handling a specific pin.

Parameters

channelId: BigString

messageId: BigString

Returns

string

pins()

pins: (channelId) => string

Route for handling a channels pins.

Parameters

channelId: BigString

Returns

string

polls

polls: object

polls.expire()

polls.expire: (channelId, messageId) => string

Parameters

channelId: BigString

messageId: BigString

Returns

string

polls.votes()

polls.votes: (channelId, messageId, answerId, options?) => string

Parameters

channelId: BigString

messageId: BigString

answerId: number

options?: GetPollAnswerVotes

Returns

string

reactions

reactions: object

Routes for handling reactions on a message.

reactions.all()

reactions.all: (channelId, messageId) => string

Route for handling all the reactions on a message.

Parameters

channelId: BigString

messageId: BigString

Returns

string

reactions.bot()

reactions.bot: (channelId, messageId, emoji) => string

Route for handling a bots reaction.

Parameters

channelId: BigString

messageId: BigString

emoji: string

Returns

string

reactions.emoji()

reactions.emoji: (channelId, messageId, emoji, options?) => string

Route for handling all reactions for a single emoji on a message.

Parameters

channelId: BigString

messageId: BigString

emoji: string

options?: GetReactions

Returns

string

reactions.message()

reactions.message: (channelId, messageId, emoji, options?) => string

Route for handling a specific reaction on a message.

Parameters

channelId: BigString

messageId: BigString

emoji: string

options?: GetReactions

Returns

string

reactions.user()

reactions.user: (channelId, messageId, emoji, userId) => string

Route for handling a user's reactions.

Parameters

channelId: BigString

messageId: BigString

emoji: string

userId: BigString

Returns

string

stage()

stage: (channelId) => string

Route for handling a specific stage

Parameters

channelId: BigString

Returns

string

stages()

stages: () => string

Route for handling non-specific stages

Returns

string

threads

threads: object

Routes for handling thread related to a channel.

threads.active()

threads.active: (guildId) => string

Route for active threads.

Parameters

guildId: BigString

Returns

string

threads.all()

threads.all: (channelId) => string

Route for thread without a message.

Parameters

channelId: BigString

Returns

string

threads.archived()

threads.archived: (channelId) => string

Route for handling archived threads.

Parameters

channelId: BigString

Returns

string

threads.joined()

threads.joined: (channelId, options?) => string

Route for handling private archived threads that the bot has joined.

Parameters

channelId: BigString

options?: ListArchivedThreads

Returns

string

threads.me()

threads.me: (channelId) => string

Route for the bot member in a thread.

Parameters

channelId: BigString

Returns

string

threads.members()

threads.members: (channelId) => string

Route for members in a thread.

Parameters

channelId: BigString

Returns

string

threads.message()

threads.message: (channelId, messageId) => string

Route for thread a specific message.

Parameters

channelId: BigString

messageId: BigString

Returns

string

threads.private()

threads.private: (channelId, options?) => string

Route for handling private archived threads.

Parameters

channelId: BigString

options?: ListArchivedThreads

Returns

string

threads.public()

threads.public: (channelId, options?) => string

Route for handling publically archived threads.

Parameters

channelId: BigString

options?: ListArchivedThreads

Returns

string

threads.user()

threads.user: (channelId, userId) => string

Route for a specific member in a thread.

Parameters

channelId: BigString

userId: BigString

Returns

string

typing()

typing: (channelId) => string

Route for handling typing indicators in a c«hannel.

Parameters

channelId: BigString

Returns

string

webhooks()

webhooks: (channelId) => string

Route for non-specific webhook in a channel.

Parameters

channelId: BigString

Returns

string

Defined in

rest/src/typings/routes.ts:39


currentUser()

currentUser: () => string

Get information about the current OAuth2 user / bot user. If used with a OAuth2 token requires the identify OAuth2 scope

Returns

string

Defined in

rest/src/typings/routes.ts:299


gatewayBot()

gatewayBot: () => string

Returns

string

Defined in

rest/src/typings/routes.ts:23


guilds

guilds: object

Routes for guild related endpoints.

all()

all: () => string

Routes for handling a non-specific guild.

Returns

string

auditlogs()

auditlogs: (guildId, options?) => string

Route for handling audit logs in a guild.

Parameters

guildId: BigString

options?: GetGuildAuditLog

Returns

string

automod

automod: object

Routes for a guilds automoderation.

automod.rule()

automod.rule: (guildId, ruleId) => string

Route for handling a specific automoderation rule guild's

Parameters

guildId: BigString

ruleId: BigString

Returns

string

automod.rules()

automod.rules: (guildId) => string

Route for handling a guild's automoderation.

Parameters

guildId: BigString

Returns

string

channels()

channels: (guildId) => string

Route for handling non-specific channels in a guild

Parameters

guildId: BigString

Returns

string

emoji()

emoji: (guildId, id) => string

Route for handling a specific emoji.

Parameters

guildId: BigString

id: BigString

Returns

string

emojis()

emojis: (guildId) => string

Route for handling non-specific emojis.

Parameters

guildId: BigString

Returns

string

events

events: object

Routes for handling a guild's scheduled events.

events.event()

events.event: (guildId, eventId, withUserCount?) => string

Route for handling a specific scheduled event.

Parameters

guildId: BigString

eventId: BigString

withUserCount?: boolean

Returns

string

events.events()

events.events: (guildId, withUserCount?) => string

Route for handling non-specific scheduled event.

Parameters

guildId: BigString

withUserCount?: boolean

Returns

string

events.users()

events.users: (guildId, eventId, options?) => string

Route for handling a scheduled event users.

Parameters

guildId: BigString

eventId: BigString

options?: GetScheduledEventUsers

Returns

string

guild()

guild: (guildId, withCounts?) => string

Route for handling a specific guild.

Parameters

guildId: BigString

withCounts?: boolean

Returns

string

integration()

integration: (guildId, integrationId) => string

Route for handling a specific integration.

Parameters

guildId: BigString

integrationId: BigString

Returns

string

integrations()

integrations: (guildId) => string

Route for handling non-specific integrations.

Parameters

guildId: BigString

Returns

string

invite()

invite: (inviteCode, options?) => string

Route for handling a specific guild invite.

Parameters

inviteCode: string

options?: GetInvite

Returns

string

invites()

invites: (guildId) => string

Route for handling non-specific invites in a guild.

Parameters

guildId: BigString

Returns

string

leave()

leave: (guildId) => string

Route for handling a bot leaving a guild.

Parameters

guildId: BigString

Returns

string

members

members: object

Routes for handling a guild's members.

members.ban()

members.ban: (guildId, userId) => string

Route for handling a specific guild member's ban.

Parameters

guildId: BigString

userId: BigString

Returns

string

members.bans()

members.bans: (guildId, options?) => string

Route for handling non-specific bans in a guild.

Parameters

guildId: BigString

options?: GetBans

Returns

string

members.bot()

members.bot: (guildId) => string

Route for handling a the bot guild member.

Parameters

guildId: BigString

Returns

string

members.bulkBan()

members.bulkBan: (guildId) => string

Route for bulk-banning members.

Parameters

guildId: BigString

Returns

string

members.currentMember()

members.currentMember: (guildId) => string

Route to get the authenticated user. Requires the guilds.members.read OAuth2 scope

Parameters

guildId: BigString

Returns

string

members.member()

members.member: (guildId, userId) => string

Route for handling a specific guild member.

Parameters

guildId: BigString

userId: BigString

Returns

string

members.members()

members.members: (guildId, options?) => string

Route for handling non-specific guild members.

Parameters

guildId: BigString

options?: ListGuildMembers

Returns

string

members.prune()

members.prune: (guildId, options?) => string

Route for handling pruning guild members.

Parameters

guildId: BigString

options?: GetGuildPruneCountQuery

Returns

string

members.search()

members.search: (guildId, query, options?) => string

Route for handling member searching in a guild.

Parameters

guildId: BigString

query: string

options?

options.limit?: number

Returns

string

mfa()

mfa: (guildId) => string

Route for handling a guilds mfa level.

Parameters

guildId: BigString

Returns

string

onboarding()

onboarding: (guildId) => string

Route for the onboarding

Parameters

guildId: BigString

Returns

string

preview()

preview: (guildId) => string

Route for handling a guild's preview.

Parameters

guildId: BigString

Returns

string

prune()

prune: (guildId, options?) => string

Route for handling pruning of a guild.

Parameters

guildId: BigString

options?: GetGuildPruneCountQuery

Returns

string

regions()

regions: (guildId) => string

Route for handling a guild's regions.

Parameters

guildId: BigString

Returns

string

roles

roles: object

Routes for handling a guild's roles.

roles.all()

roles.all: (guildId) => string

Route for handling a guild's roles.

Parameters

guildId: BigString

Returns

string

roles.member()

roles.member: (guildId, memberId, roleId) => string

Route for handling a members roles in a guild.

Parameters

guildId: BigString

memberId: BigString

roleId: BigString

Returns

string

roles.one()

roles.one: (guildId, roleId) => string

Route for handling a specific guild role.

Parameters

guildId: BigString

roleId: BigString

Returns

string

sticker()

sticker: (guildId, stickerId) => string

Route for handling non-specific guild stickers.

Parameters

guildId: BigString

stickerId: BigString

Returns

string

stickers()

stickers: (guildId) => string

Route for handling a specific guild sticker.

Parameters

guildId: BigString

Returns

string

templates

templates: object

Routes for handling a guild's templates.

templates.all()

templates.all: (guildId) => string

Route for handling non-specific guild's templates.

Parameters

guildId: BigString

Returns

string

templates.code()

templates.code: (code) => string

Route for handling a specifc guild's templates with a code only.

Parameters

code: string

Returns

string

templates.guild()

templates.guild: (guildId, code) => string

Route for handling a specific guild's template with a guild id and code.

Parameters

guildId: BigString

code: string

Returns

string

userGuilds()

userGuilds: (options?) => string

Route for fetching an user guilds. Requires guilds OAuth2 scope

Parameters

options?: GetUserGuilds

Returns

string

vanity()

vanity: (guildId) => string

Route for handling a guild's vanity url.

Parameters

guildId: BigString

Returns

string

voice()

voice: (guildId, userId?) => string

Route for handling a voice state.

Parameters

guildId: BigString

userId?: BigString

Returns

string

webhooks()

webhooks: (guildId) => string

Route for handling non-specific webhooks in a guild

Parameters

guildId: BigString

Returns

string

welcome()

welcome: (guildId) => string

Route for handling a guild's welcome screen.

Parameters

guildId: BigString

Returns

string

widget()

widget: (guildId) => string

Route for handling a guild's widget.

Parameters

guildId: BigString

Returns

string

widgetJson()

widgetJson: (guildId) => string

Route for handling a guild's widget in the form of json.

Parameters

guildId: BigString

Returns

string

Defined in

rest/src/typings/routes.ts:116


interactions

interactions: object

Routes for interaction related endpoints.

commands

commands: object

Routes for interaction command related endpoints.

commands.command()

commands.command: (applicationId, commandId, withLocalizations?) => string

Route for a specific command.

Parameters

applicationId: BigString

commandId: BigString

withLocalizations?: boolean

Returns

string

commands.commands()

commands.commands: (applicationId) => string

Route for non-specific commands.

Parameters

applicationId: BigString

Returns

string

commands.guilds

commands.guilds: object

Route for guild related commands.

commands.guilds.all()

commands.guilds.all: (applicationId, guildId) => string

Route for non-specific guild commands.

Parameters

applicationId: BigString

guildId: BigString

Returns

string

commands.guilds.one()

commands.guilds.one: (applicationId, guildId, commandId, withLocalizations?) => string

Route for a specific guild command.

Parameters

applicationId: BigString

guildId: BigString

commandId: BigString

withLocalizations?: boolean

Returns

string

commands.permission()

commands.permission: (applicationId, guildId, commandId) => string

Route for a specific command's permission.

Parameters

applicationId: BigString

guildId: BigString

commandId: BigString

Returns

string

commands.permissions()

commands.permissions: (applicationId, guildId) => string

Route for non-specific command permissions.

Parameters

applicationId: BigString

guildId: BigString

Returns

string

responses

responses: object

Routes for interaction response related endpoints.

responses.callback()

responses.callback: (interactionId, token, options?) => string

Route for handling a callback response with id and token.

Parameters

interactionId: BigString

token: string

options?: InteractionCallbackOptions

Returns

string

responses.message()

responses.message: (applicationId, token, messageId) => string

Route for handling a followup message from a interaction response.

Parameters

applicationId: BigString

token: string

messageId: BigString

Returns

string

responses.original()

responses.original: (interactionId, token) => string

Route for handling the original response using id and token.

Parameters

interactionId: BigString

token: string

Returns

string

Defined in

rest/src/typings/routes.ts:224


monetization

monetization: object

Routes related to monetization (entitlements and SKU)

consumeEntitlement()

consumeEntitlement: (applicationId, entitlementId) => string

Route to consume an entitlement

Parameters

applicationId: BigString

entitlementId: BigString

Returns

string

entitlement()

entitlement: (applicationId, entitlementId) => string

Route to delete an entitlement

Parameters

applicationId: BigString

entitlementId: BigString

Returns

string

entitlements()

entitlements: (applicationId, options?) => string

Route to list / create entitlements

Parameters

applicationId: BigString

options?: GetEntitlements

Returns

string

skus()

skus: (applicationId) => string

Route to list the SKUs

Parameters

applicationId: BigString

Returns

string

subscription()

subscription: (skuId, subscriptionId) => string

Route to get a SKU subscription

Parameters

skuId: BigString

subscriptionId: BigString

Returns

string

subscriptions()

subscriptions: (skuId, options?) => string

Route to list the SKU subscriptions

Parameters

skuId: BigString

options?: ListSkuSubscriptionsOptions

Returns

string

Defined in

rest/src/typings/routes.ts:269


oauth2

oauth2: object

Routes related to OAuth2

application()

application: () => string

Route to get information about the current application.

Returns

string

connections()

connections: () => string

Route to get the connection the user has. Requires the connections OAuth2 scope

Returns

string

currentAuthorization()

currentAuthorization: () => string

Route to get information about the current authorization. Requires an access token

Returns

string

roleConnections()

roleConnections: (applicationId) => string

Route to handling role-connection for an application

Parameters

applicationId: BigString

Returns

string

tokenExchange()

tokenExchange: () => string

Route to generate a new access token

Returns

string

tokenRevoke()

tokenRevoke: () => string

Route to revoke an OAuth2 access_token

Returns

string

Defined in

rest/src/typings/routes.ts:254


regions()

regions: () => string

Route for handling all voice regions.

Returns

string

Defined in

rest/src/typings/routes.ts:307


soundboard

soundboard: object

Routes related to soundboard sounds

guildSound()

guildSound: (guildId, soundId) => string

Route for get/edit/delete of a guild sound

Parameters

guildId: BigString

soundId: BigString

Returns

string

guildSounds()

guildSounds: (guildId) => string

Route for list/create a guild sounds

Parameters

guildId: BigString

Returns

string

listDefault()

listDefault: () => string

List the discord default soundboard sounds

Returns

string

sendSound()

sendSound: (channelId) => string

Send a soundboard sound to a voice channel the user is connected to.

Parameters

channelId: BigString

Returns

string

Defined in

rest/src/typings/routes.ts:284


sticker()

sticker: (stickerId) => string

Route for handling a sticker.

Parameters

stickerId: BigString

Returns

string

Defined in

rest/src/typings/routes.ts:305


stickerPack()

stickerPack: (stickerPackId) => string

Parameters

stickerPackId: BigString

Returns

string

Defined in

rest/src/typings/routes.ts:26


stickerPacks()

stickerPacks: () => string

Returns

string

Defined in

rest/src/typings/routes.ts:25


user()

user: (id) => string

A specific user route.

Parameters

id: BigString

Returns

string

Defined in

rest/src/typings/routes.ts:21


webhooks

webhooks: object

Routes for webhook related routes.

id()

id: (webhookId) => string

Route for webhook with a id.

Parameters

webhookId: BigString

Returns

string

message()

message: (webhookId, token, messageId, options?) => string

Route for handling a message that was sent through a webhook.

Parameters

webhookId: BigString

token: string

messageId: BigString

options?

options.threadId?: BigString

Returns

string

original()

original: (webhookId, token, options?) => string

Route for managing the original message sent by a webhook.

Parameters

webhookId: BigString

token: string

options?

options.threadId?: BigString

Returns

string

webhook()

webhook: (webhookId, token, options?) => string

Route for handling a webhook with a token.

Parameters

webhookId: BigString

token: string

options?

options.threadId?: BigString

options.wait?: boolean

Returns

string

Defined in

rest/src/typings/routes.ts:28