Interface RESTClient

Hierarchy

Properties

addGuildMember addGuildMemberRole addThreadMember batchEditApplicationCommandPermissions beginGuildPrune bulkDeleteMessages bulkOverwriteGlobalApplicationCommands bulkOverwriteGuildApplicationCommands createAutoModerationRule createChannelInvite createDm createFollowupMessage createGlobalApplicationCommand createGroupDm createGuild createGuildApplicationCommand createGuildBan createGuildChannel createGuildEmoji createGuildFromGuildTemplate createGuildRole createGuildScheduledEvent createGuildSticker createGuildTemplate createInteractionResponse createMessage createReaction createStageInstance createWebhook crosspostMessage debug$ delete deleteAllReactions deleteAllReactionsForEmoji deleteAutoModerationRule deleteChannelPermission deleteFollowupMessage deleteGlobalApplicationCommand deleteGuild deleteGuildApplicationCommand deleteGuildEmoji deleteGuildIntegration deleteGuildRole deleteGuildScheduledEvent deleteGuildSticker deleteGuildTemplate deleteInvite deleteMessage deleteOriginalInteractionResponse deleteOwnReaction deleteStageInstance deleteUserReaction deleteWebhook deleteWebhookMessage deleteWebhookWithToken deletecloseChannel editApplicationCommandPermissions editChannelPermissions editFollowupMessage editGlobalApplicationCommand editGuildApplicationCommand editMessage editOriginalInteractionResponse editWebhookMessage effects$ executeGitHubCompatibleWebhook executeSlackCompatibleWebhook executeWebhook followAnnouncementChannel get getApplicationCommandPermissions getApplicationRoleConnectionMetadataRecords getAutoModerationRule getChannel getChannelInvites getChannelMessage getChannelMessages getChannelWebhooks getCurrentAuthorizationInformation getCurrentBotApplicationInformation getCurrentUser getCurrentUserGuildMember getCurrentUserGuilds getFollowupMessage getGateway getGatewayBot getGlobalApplicationCommand getGlobalApplicationCommands getGuild getGuildApplicationCommand getGuildApplicationCommandPermissions getGuildApplicationCommands getGuildAuditLog getGuildBan getGuildBans getGuildChannels getGuildEmoji getGuildIntegrations getGuildInvites getGuildMember getGuildOnboarding getGuildPreview getGuildPruneCount getGuildRoles getGuildScheduledEvent getGuildScheduledEventUsers getGuildSticker getGuildTemplate getGuildTemplates getGuildVanityUrl getGuildVoiceRegions getGuildWebhooks getGuildWelcomeScreen getGuildWidget getGuildWidgetImage getGuildWidgetSettings getInvite getOriginalInteractionResponse getPinnedMessages getReactions getStageInstance getSticker getThreadMember getUser getUserApplicationRoleConnection getUserConnections getWebhook getWebhookMessage getWebhookWithToken groupDmAddRecipient groupDmRemoveRecipient joinThread leaveGuild leaveThread listActiveGuildThreads listAutoModerationRulesForGuild listGuildEmojis listGuildMembers listGuildStickers listJoinedPrivateArchivedThreads listNitroStickerPacks listPrivateArchivedThreads listPublicArchivedThreads listScheduledEventsForGuild listThreadMembers listVoiceRegions modifyAutoModerationRule modifyChannel modifyCurrentMember modifyCurrentUser modifyCurrentUserNick modifyCurrentUserVoiceState modifyGuild modifyGuildChannelPositions modifyGuildEmoji modifyGuildMember modifyGuildMfaLevel modifyGuildRole modifyGuildRolePositions modifyGuildScheduledEvent modifyGuildSticker modifyGuildTemplate modifyGuildWelcomeScreen modifyGuildWidget modifyStageInstance modifyUserVoiceState modifyWebhook modifyWebhookWithToken patch pinMessage post put removeGuildBan removeGuildMember removeGuildMemberRole removeThreadMember request searchGuildMembers startThreadFromMessage startThreadInForumChannel startThreadWithoutMessage syncGuildTemplate triggerTypingIndicator unpinMessage updateApplicationRoleConnectionMetadataRecords updateUserApplicationRoleConnection

Properties

addGuildMember: ((guildId: string, userId: string, params?: Partial<AddGuildMemberParams>, options?: AxiosRequestConfig<any>) => Promise<GuildMember>)

Type declaration

    • (guildId: string, userId: string, params?: Partial<AddGuildMemberParams>, options?: AxiosRequestConfig<any>): Promise<GuildMember>
    • Adds a user to the guild, provided you have a valid oauth2 access token for the user with the guilds.join scope. Returns a 201 Created with the guild member as the body, or 204 No Content if the user is already a member of the guild. Fires a Guild Member Add Gateway event.

      Parameters

      • guildId: string
      • userId: string
      • Optional params: Partial<AddGuildMemberParams>
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<GuildMember>

addGuildMemberRole: ((guildId: string, userId: string, roleId: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (guildId: string, userId: string, roleId: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Adds a role to a guild member. Requires the MANAGE_ROLES permission. Returns a 204 empty response on success. Fires a Guild Member Update Gateway event.

      Parameters

      • guildId: string
      • userId: string
      • roleId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

addThreadMember: ((channelId: string, userId: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (channelId: string, userId: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Adds another member to a thread. Requires the ability to send messages in the thread. Also requires the thread is not archived. Returns a 204 empty response if the member is successfully added or was already a member of the thread. Fires a Thread Members Update Gateway event.

      Parameters

      • channelId: string
      • userId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

batchEditApplicationCommandPermissions: ((applicationId: string, guildId: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (applicationId: string, guildId: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Parameters

      • applicationId: string
      • guildId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

beginGuildPrune: ((guildId: string, params?: Partial<BeginGuildPruneParams>, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (guildId: string, params?: Partial<BeginGuildPruneParams>, options?: AxiosRequestConfig<any>): Promise<any>
    • Begin a prune operation. Requires the KICK_MEMBERS permission. Returns an object with one pruned key indicating the number of members that were removed in the prune operation. For large guilds it's recommended to set the compute_prune_count option to false, forcing pruned to null. Fires multiple Guild Member Remove Gateway events.

      Parameters

      • guildId: string
      • Optional params: Partial<BeginGuildPruneParams>
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

bulkDeleteMessages: ((channelId: string, params?: Partial<BulkDeleteMessageParams>, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (channelId: string, params?: Partial<BulkDeleteMessageParams>, options?: AxiosRequestConfig<any>): Promise<any>
    • Delete multiple messages in a single request. This endpoint can only be used on guild channels and requires the MANAGE_MESSAGES permission. Returns a 204 empty response on success. Fires a Message Delete Bulk Gateway event.

      Parameters

      Returns Promise<any>

bulkOverwriteGlobalApplicationCommands: ((applicationId: string, options?: AxiosRequestConfig<any>) => Promise<ApplicationCommand[]>)

Type declaration

    • (applicationId: string, options?: AxiosRequestConfig<any>): Promise<ApplicationCommand[]>
    • Takes a list of application commands, overwriting the existing global command list for this application. Returns 200 and a list of application command objects. Commands that do not already exist will count toward daily application command create limits.

      Parameters

      • applicationId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<ApplicationCommand[]>

bulkOverwriteGuildApplicationCommands: ((applicationId: string, guildId: string, params?: Partial<BulkOverwriteGuildApplicationCommandParams>, options?: AxiosRequestConfig<any>) => Promise<ApplicationCommand[]>)

Type declaration

createAutoModerationRule: ((guildId: string, params?: Partial<CreateAutoModerationRuleParams>, options?: AxiosRequestConfig<any>) => Promise<AutoModerationRule>)

Type declaration

createChannelInvite: ((channelId: string, params?: Partial<CreateChannelInviteParams>, options?: AxiosRequestConfig<any>) => Promise<Invite>)

Type declaration

    • (channelId: string, params?: Partial<CreateChannelInviteParams>, options?: AxiosRequestConfig<any>): Promise<Invite>
    • Create a new invite object for the channel. Only usable for guild channels. Requires the CREATE_INSTANT_INVITE permission. All JSON parameters for this route are optional, however the request body is not. If you are not sending any fields, you still have to send an empty JSON object ({}). Returns an invite object. Fires an Invite Create Gateway event.

      Parameters

      Returns Promise<Invite>

createDm: ((params?: Partial<CreateDmParams>, options?: AxiosRequestConfig<any>) => Promise<Channel>)

Type declaration

    • (params?: Partial<CreateDmParams>, options?: AxiosRequestConfig<any>): Promise<Channel>
    • Create a new DM channel with a user. Returns a DM channel object (if one already exists, it will be returned instead).

      Parameters

      • Optional params: Partial<CreateDmParams>
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<Channel>

createFollowupMessage: ((applicationId: string, interactionToken: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (applicationId: string, interactionToken: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Create a followup message for an Interaction. Functions the same as Execute Webhook, but wait is always true. The thread_id, avatar_url, and username parameters are not supported when using this endpoint for interaction followups.

      Parameters

      • applicationId: string
      • interactionToken: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

createGlobalApplicationCommand: ((applicationId: string, params?: Partial<CreateGlobalApplicationCommandParams>, options?: AxiosRequestConfig<any>) => Promise<ApplicationCommand>)

Type declaration

createGroupDm: ((params?: Partial<CreateGroupDmParams>, options?: AxiosRequestConfig<any>) => Promise<Channel>)

Type declaration

    • (params?: Partial<CreateGroupDmParams>, options?: AxiosRequestConfig<any>): Promise<Channel>
    • Create a new group DM channel with multiple users. Returns a DM channel object. This endpoint was intended to be used with the now-deprecated GameBridge SDK. Fires a Channel Create Gateway event.

      Parameters

      Returns Promise<Channel>

createGuild: ((params?: Partial<CreateGuildParams>, options?: AxiosRequestConfig<any>) => Promise<Guild>)

Type declaration

    • (params?: Partial<CreateGuildParams>, options?: AxiosRequestConfig<any>): Promise<Guild>
    • Create a new guild. Returns a guild object on success. Fires a Guild Create Gateway event.

      Parameters

      • Optional params: Partial<CreateGuildParams>
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<Guild>

createGuildApplicationCommand: ((applicationId: string, guildId: string, params?: Partial<CreateGuildApplicationCommandParams>, options?: AxiosRequestConfig<any>) => Promise<ApplicationCommand>)

Type declaration

createGuildBan: ((guildId: string, userId: string, params?: Partial<CreateGuildBanParams>, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (guildId: string, userId: string, params?: Partial<CreateGuildBanParams>, options?: AxiosRequestConfig<any>): Promise<any>
    • Create a guild ban, and optionally delete previous messages sent by the banned user. Requires the BAN_MEMBERS permission. Returns a 204 empty response on success. Fires a Guild Ban Add Gateway event.

      Parameters

      • guildId: string
      • userId: string
      • Optional params: Partial<CreateGuildBanParams>
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

createGuildChannel: ((guildId: string, params?: Partial<CreateGuildChannelParams>, options?: AxiosRequestConfig<any>) => Promise<Channel>)

Type declaration

    • (guildId: string, params?: Partial<CreateGuildChannelParams>, options?: AxiosRequestConfig<any>): Promise<Channel>
    • Create a new channel object for the guild. Requires the MANAGE_CHANNELS permission. If setting permission overwrites, only permissions your bot has in the guild can be allowed/denied. Setting MANAGE_ROLES permission in channels is only possible for guild administrators. Returns the new channel object on success. Fires a Channel Create Gateway event.

      Parameters

      Returns Promise<Channel>

createGuildEmoji: ((guildId: string, params?: Partial<CreateGuildEmojiParams>, options?: AxiosRequestConfig<any>) => Promise<Emoji>)

Type declaration

    • (guildId: string, params?: Partial<CreateGuildEmojiParams>, options?: AxiosRequestConfig<any>): Promise<Emoji>
    • Create a new emoji for the guild. Requires the MANAGE_GUILD_EXPRESSIONS permission. Returns the new emoji object on success. Fires a Guild Emojis Update Gateway event.

      Parameters

      Returns Promise<Emoji>

createGuildFromGuildTemplate: ((templateCode: string, params?: Partial<CreateGuildFromGuildTemplateParams>, options?: AxiosRequestConfig<any>) => Promise<Guild>)

Type declaration

    • (templateCode: string, params?: Partial<CreateGuildFromGuildTemplateParams>, options?: AxiosRequestConfig<any>): Promise<Guild>
    • Create a new guild based on a template. Returns a guild object on success. Fires a Guild Create Gateway event.

      Parameters

      Returns Promise<Guild>

createGuildRole: ((guildId: string, params?: Partial<CreateGuildRoleParams>, options?: AxiosRequestConfig<any>) => Promise<Role>)

Type declaration

    • (guildId: string, params?: Partial<CreateGuildRoleParams>, options?: AxiosRequestConfig<any>): Promise<Role>
    • Create a new role for the guild. Requires the MANAGE_ROLES permission. Returns the new role object on success. Fires a Guild Role Create Gateway event. All JSON params are optional.

      Parameters

      • guildId: string
      • Optional params: Partial<CreateGuildRoleParams>
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<Role>

createGuildScheduledEvent: ((guildId: string, params?: Partial<CreateGuildScheduledEventParams>, options?: AxiosRequestConfig<any>) => Promise<GuildScheduledEvent>)

Type declaration

createGuildSticker: ((guildId: string, params?: Partial<CreateGuildStickerParams>, options?: AxiosRequestConfig<any>) => Promise<Sticker>)

Type declaration

    • (guildId: string, params?: Partial<CreateGuildStickerParams>, options?: AxiosRequestConfig<any>): Promise<Sticker>
    • Create a new sticker for the guild. Send a multipart/form-data body. Requires the MANAGE_GUILD_EXPRESSIONS permission. Returns the new sticker object on success. Fires a Guild Stickers Update Gateway event.

      Parameters

      Returns Promise<Sticker>

createGuildTemplate: ((guildId: string, params?: Partial<CreateGuildTemplateParams>, options?: AxiosRequestConfig<any>) => Promise<GuildTemplate>)

Type declaration

    • (guildId: string, params?: Partial<CreateGuildTemplateParams>, options?: AxiosRequestConfig<any>): Promise<GuildTemplate>
    • Creates a template for the guild. Requires the MANAGE_GUILD permission. Returns the created guild template object on success.

      Parameters

      Returns Promise<GuildTemplate>

createInteractionResponse: ((interactionId: string, interactionToken: string, params?: Partial<InteractionResponse>, options?: AxiosRequestConfig<any>) => Promise<InteractionResponse>)

Type declaration

    • (interactionId: string, interactionToken: string, params?: Partial<InteractionResponse>, options?: AxiosRequestConfig<any>): Promise<InteractionResponse>
    • Create a response to an Interaction from the gateway. Body is an interaction response. Returns 204 No Content.

      Parameters

      • interactionId: string
      • interactionToken: string
      • Optional params: Partial<InteractionResponse>
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<InteractionResponse>

createMessage: ((channelId: string, params?: Partial<CreateMessageParams>, options?: AxiosRequestConfig<any>) => Promise<Message>)

Type declaration

createReaction: ((channelId: string, messageId: string, emoji: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (channelId: string, messageId: string, emoji: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Create a reaction for the message. This endpoint requires the READ_MESSAGE_HISTORY permission to be present on the current user. Additionally, if nobody else has reacted to the message using this emoji, this endpoint requires the ADD_REACTIONS permission to be present on the current user. Returns a 204 empty response on success. Fires a Message Reaction Add Gateway event. The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji. To use custom emoji, you must encode it in the format name:id with the emoji name and emoji id.

      Parameters

      • channelId: string
      • messageId: string
      • emoji: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

createStageInstance: ((params?: Partial<CreateStageInstanceParams>, options?: AxiosRequestConfig<any>) => Promise<StageInstance>)

Type declaration

createWebhook: ((channelId: string, params?: Partial<CreateWebhookParams>, options?: AxiosRequestConfig<any>) => Promise<Webhook>)

Type declaration

    • (channelId: string, params?: Partial<CreateWebhookParams>, options?: AxiosRequestConfig<any>): Promise<Webhook>
    • Creates a new webhook and returns a webhook object on success. Requires the MANAGE_WEBHOOKS permission. Fires a Webhooks Update Gateway event.

      Parameters

      • channelId: string
      • Optional params: Partial<CreateWebhookParams>
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<Webhook>

crosspostMessage: ((channelId: string, messageId: string, options?: AxiosRequestConfig<any>) => Promise<Message>)

Type declaration

    • (channelId: string, messageId: string, options?: AxiosRequestConfig<any>): Promise<Message>
    • Crosspost a message in an Announcement Channel to following channels. This endpoint requires the SEND_MESSAGES permission, if the current user sent the message, or additionally the MANAGE_MESSAGES permission, for all other messages, to be present for the current user.

      Parameters

      • channelId: string
      • messageId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<Message>

debug$: Observable<never>
delete: (<T, R, D>(url: string, config?: AxiosRequestConfig<D>) => Promise<R>)

Type declaration

    • <T, R, D>(url: string, config?: AxiosRequestConfig<D>): Promise<R>
    • Type Parameters

      • T = any

      • R = AxiosResponse<T, any>

      • D = any

      Parameters

      • url: string
      • Optional config: AxiosRequestConfig<D>

      Returns Promise<R>

deleteAllReactions: ((channelId: string, messageId: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (channelId: string, messageId: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Deletes all reactions on a message. This endpoint requires the MANAGE_MESSAGES permission to be present on the current user. Fires a Message Reaction Remove All Gateway event.

      Parameters

      • channelId: string
      • messageId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

deleteAllReactionsForEmoji: ((channelId: string, messageId: string, emoji: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (channelId: string, messageId: string, emoji: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Deletes all the reactions for a given emoji on a message. This endpoint requires the MANAGE_MESSAGES permission to be present on the current user. Fires a Message Reaction Remove Emoji Gateway event. The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji. To use custom emoji, you must encode it in the format name:id with the emoji name and emoji id.

      Parameters

      • channelId: string
      • messageId: string
      • emoji: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

deleteAutoModerationRule: ((guildId: string, autoModerationRuleId: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (guildId: string, autoModerationRuleId: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Delete a rule. Returns a 204 on success. Fires an Auto Moderation Rule Delete Gateway event.

      Parameters

      • guildId: string
      • autoModerationRuleId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

deleteChannelPermission: ((channelId: string, overwriteId: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (channelId: string, overwriteId: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Delete a channel permission overwrite for a user or role in a channel. Only usable for guild channels. Requires the MANAGE_ROLES permission. Returns a 204 empty response on success. Fires a Channel Update Gateway event. For more information about permissions, see permissions

      Parameters

      • channelId: string
      • overwriteId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

deleteFollowupMessage: ((applicationId: string, interactionToken: string, messageId: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (applicationId: string, interactionToken: string, messageId: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Deletes a followup message for an Interaction. Returns 204 No Content on success.

      Parameters

      • applicationId: string
      • interactionToken: string
      • messageId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

deleteGlobalApplicationCommand: ((applicationId: string, commandId: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (applicationId: string, commandId: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Deletes a global command. Returns 204 No Content on success.

      Parameters

      • applicationId: string
      • commandId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

deleteGuild: ((guildId: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (guildId: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Delete a guild permanently. User must be owner. Returns 204 No Content on success. Fires a Guild Delete Gateway event.

      Parameters

      • guildId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

deleteGuildApplicationCommand: ((applicationId: string, guildId: string, commandId: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (applicationId: string, guildId: string, commandId: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Delete a guild command. Returns 204 No Content on success.

      Parameters

      • applicationId: string
      • guildId: string
      • commandId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

deleteGuildEmoji: ((guildId: string, emojiId: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (guildId: string, emojiId: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Delete the given emoji. Requires the MANAGE_GUILD_EXPRESSIONS permission. Returns 204 No Content on success. Fires a Guild Emojis Update Gateway event.

      Parameters

      • guildId: string
      • emojiId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

deleteGuildIntegration: ((guildId: string, integrationId: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (guildId: string, integrationId: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Delete the attached integration object for the guild. Deletes any associated webhooks and kicks the associated bot if there is one. Requires the MANAGE_GUILD permission. Returns a 204 empty response on success. Fires Guild Integrations Update and Integration Delete Gateway events.

      Parameters

      • guildId: string
      • integrationId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

deleteGuildRole: ((guildId: string, roleId: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (guildId: string, roleId: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Delete a guild role. Requires the MANAGE_ROLES permission. Returns a 204 empty response on success. Fires a Guild Role Delete Gateway event.

      Parameters

      • guildId: string
      • roleId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

deleteGuildScheduledEvent: ((guildId: string, guildScheduledEventId: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (guildId: string, guildScheduledEventId: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Delete a guild scheduled event. Returns a 204 on success. Fires a Guild Scheduled Event Delete Gateway event.

      Parameters

      • guildId: string
      • guildScheduledEventId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

deleteGuildSticker: ((guildId: string, stickerId: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (guildId: string, stickerId: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Delete the given sticker. Requires the MANAGE_GUILD_EXPRESSIONS permission. Returns 204 No Content on success. Fires a Guild Stickers Update Gateway event.

      Parameters

      • guildId: string
      • stickerId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

deleteGuildTemplate: ((guildId: string, templateCode: string, options?: AxiosRequestConfig<any>) => Promise<GuildTemplate>)

Type declaration

    • (guildId: string, templateCode: string, options?: AxiosRequestConfig<any>): Promise<GuildTemplate>
    • Deletes the template. Requires the MANAGE_GUILD permission. Returns the deleted guild template object on success.

      Parameters

      • guildId: string
      • templateCode: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<GuildTemplate>

deleteInvite: ((inviteCode: string, options?: AxiosRequestConfig<any>) => Promise<Invite>)

Type declaration

    • (inviteCode: string, options?: AxiosRequestConfig<any>): Promise<Invite>
    • Delete an invite. Requires the MANAGE_CHANNELS permission on the channel this invite belongs to, or MANAGE_GUILD to remove any invite across the guild. Returns an invite object on success. Fires an Invite Delete Gateway event.

      Parameters

      • inviteCode: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<Invite>

deleteMessage: ((channelId: string, messageId: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (channelId: string, messageId: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Delete a message. If operating on a guild channel and trying to delete a message that was not sent by the current user, this endpoint requires the MANAGE_MESSAGES permission. Returns a 204 empty response on success. Fires a Message Delete Gateway event.

      Parameters

      • channelId: string
      • messageId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

deleteOriginalInteractionResponse: ((applicationId: string, interactionToken: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (applicationId: string, interactionToken: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Deletes the initial Interaction response. Returns 204 No Content on success.

      Parameters

      • applicationId: string
      • interactionToken: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

deleteOwnReaction: ((channelId: string, messageId: string, emoji: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (channelId: string, messageId: string, emoji: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Delete a reaction the current user has made for the message. Returns a 204 empty response on success. Fires a Message Reaction Remove Gateway event. The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji. To use custom emoji, you must encode it in the format name:id with the emoji name and emoji id.

      Parameters

      • channelId: string
      • messageId: string
      • emoji: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

deleteStageInstance: ((channelId: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (channelId: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Deletes the Stage instance. Returns 204 No Content. Fires a Stage Instance Delete Gateway event.

      Parameters

      • channelId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

deleteUserReaction: ((channelId: string, messageId: string, emoji: string, userId: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (channelId: string, messageId: string, emoji: string, userId: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Deletes another user's reaction. This endpoint requires the MANAGE_MESSAGES permission to be present on the current user. Returns a 204 empty response on success. Fires a Message Reaction Remove Gateway event. The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji. To use custom emoji, you must encode it in the format name:id with the emoji name and emoji id.

      Parameters

      • channelId: string
      • messageId: string
      • emoji: string
      • userId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

deleteWebhook: ((webhookId: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (webhookId: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Delete a webhook permanently. Requires the MANAGE_WEBHOOKS permission. Returns a 204 No Content response on success. Fires a Webhooks Update Gateway event.

      Parameters

      • webhookId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

deleteWebhookMessage: ((webhookId: string, webhookToken: string, messageId: string, params?: Partial<DeleteWebhookMessageParams>, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (webhookId: string, webhookToken: string, messageId: string, params?: Partial<DeleteWebhookMessageParams>, options?: AxiosRequestConfig<any>): Promise<any>
    • Deletes a message that was created by the webhook. Returns a 204 No Content response on success.

      Parameters

      • webhookId: string
      • webhookToken: string
      • messageId: string
      • Optional params: Partial<DeleteWebhookMessageParams>
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

deleteWebhookWithToken: ((webhookId: string, webhookToken: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (webhookId: string, webhookToken: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Same as above, except this call does not require authentication.

      Parameters

      • webhookId: string
      • webhookToken: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

deletecloseChannel: ((channelId: string, options?: AxiosRequestConfig<any>) => Promise<Channel>)

Type declaration

    • (channelId: string, options?: AxiosRequestConfig<any>): Promise<Channel>
    • Delete a channel, or close a private message. Requires the MANAGE_CHANNELS permission for the guild, or MANAGE_THREADS if the channel is a thread. Deleting a category does not delete its child channels; they will have their parent_id removed and a Channel Update Gateway event will fire for each of them. Returns a channel object on success. Fires a Channel Delete Gateway event (or Thread Delete if the channel was a thread).

      Parameters

      • channelId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<Channel>

editApplicationCommandPermissions: ((applicationId: string, guildId: string, commandId: string, params?: Partial<EditApplicationCommandPermissionParams>, options?: AxiosRequestConfig<any>) => Promise<GuildApplicationCommandPermission>)

Type declaration

editChannelPermissions: ((channelId: string, overwriteId: string, params?: Partial<EditChannelPermissionParams>, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (channelId: string, overwriteId: string, params?: Partial<EditChannelPermissionParams>, options?: AxiosRequestConfig<any>): Promise<any>
    • Edit the channel permission overwrites for a user or role in a channel. Only usable for guild channels. Requires the MANAGE_ROLES permission. Only permissions your bot has in the guild or parent channel (if applicable) can be allowed/denied (unless your bot has a MANAGE_ROLES overwrite in the channel). Returns a 204 empty response on success. Fires a Channel Update Gateway event. For more information about permissions, see permissions.

      Parameters

      Returns Promise<any>

editFollowupMessage: ((applicationId: string, interactionToken: string, messageId: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (applicationId: string, interactionToken: string, messageId: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Edits a followup message for an Interaction. Functions the same as Edit Webhook Message.

      Parameters

      • applicationId: string
      • interactionToken: string
      • messageId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

editGlobalApplicationCommand: ((applicationId: string, commandId: string, params?: Partial<EditGlobalApplicationCommandParams>, options?: AxiosRequestConfig<any>) => Promise<ApplicationCommand>)

Type declaration

editGuildApplicationCommand: ((applicationId: string, guildId: string, commandId: string, params?: Partial<EditGuildApplicationCommandParams>, options?: AxiosRequestConfig<any>) => Promise<ApplicationCommand>)

Type declaration

editMessage: ((channelId: string, messageId: string, params?: Partial<EditMessageParams>, options?: AxiosRequestConfig<any>) => Promise<Message>)

Type declaration

    • (channelId: string, messageId: string, params?: Partial<EditMessageParams>, options?: AxiosRequestConfig<any>): Promise<Message>
    • Edit a previously sent message. The fields content, embeds, and flags can be edited by the original message author. Other users can only edit flags and only if they have the MANAGE_MESSAGES permission in the corresponding channel. When specifying flags, ensure to include all previously set flags/bits in addition to ones that you are modifying. Only flags documented in the table below may be modified by users (unsupported flag changes are currently ignored without error).

      Parameters

      • channelId: string
      • messageId: string
      • Optional params: Partial<EditMessageParams>
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<Message>

editOriginalInteractionResponse: ((applicationId: string, interactionToken: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (applicationId: string, interactionToken: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Edits the initial Interaction response. Functions the same as Edit Webhook Message.

      Parameters

      • applicationId: string
      • interactionToken: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

editWebhookMessage: ((webhookId: string, webhookToken: string, messageId: string, params?: Partial<EditWebhookMessageParams>, options?: AxiosRequestConfig<any>) => Promise<Message>)

Type declaration

    • (webhookId: string, webhookToken: string, messageId: string, params?: Partial<EditWebhookMessageParams>, options?: AxiosRequestConfig<any>): Promise<Message>
    • Edits a previously-sent webhook message from the same token. Returns a message object on success.

      Parameters

      • webhookId: string
      • webhookToken: string
      • messageId: string
      • Optional params: Partial<EditWebhookMessageParams>
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<Message>

effects$: Observable<never>

Observable of side effects. It is required that you subscribe to this for the client to function.

executeGitHubCompatibleWebhook: ((webhookId: string, webhookToken: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (webhookId: string, webhookToken: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Add a new webhook to your GitHub repo (in the repo's settings), and use this endpoint as the "Payload URL." You can choose what events your Discord channel receives by choosing the "Let me select individual events" option and selecting individual events for the new webhook you're configuring.

      Parameters

      • webhookId: string
      • webhookToken: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

executeSlackCompatibleWebhook: ((webhookId: string, webhookToken: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (webhookId: string, webhookToken: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Refer to Slack's documentation for more information. We do not support Slack's channel, icon_emoji, mrkdwn, or mrkdwn_in properties.

      Parameters

      • webhookId: string
      • webhookToken: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

executeWebhook: ((webhookId: string, webhookToken: string, params?: Partial<ExecuteWebhookParams>, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (webhookId: string, webhookToken: string, params?: Partial<ExecuteWebhookParams>, options?: AxiosRequestConfig<any>): Promise<any>
    • Refer to Uploading Files for details on attachments and multipart/form-data requests. Returns a message or 204 No Content depending on the wait query parameter.

      Parameters

      • webhookId: string
      • webhookToken: string
      • Optional params: Partial<ExecuteWebhookParams>
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

followAnnouncementChannel: ((channelId: string, params?: Partial<FollowAnnouncementChannelParams>, options?: AxiosRequestConfig<any>) => Promise<FollowedChannel>)

Type declaration

    • (channelId: string, params?: Partial<FollowAnnouncementChannelParams>, options?: AxiosRequestConfig<any>): Promise<FollowedChannel>
    • Follow an Announcement Channel to send messages to a target channel. Requires the MANAGE_WEBHOOKS permission in the target channel. Returns a followed channel object. Fires a Webhooks Update Gateway event for the target channel.

      Parameters

      Returns Promise<FollowedChannel>

get: (<T, R, D>(url: string, config?: AxiosRequestConfig<D>) => Promise<R>)

Type declaration

    • <T, R, D>(url: string, config?: AxiosRequestConfig<D>): Promise<R>
    • Type Parameters

      • T = any

      • R = AxiosResponse<T, any>

      • D = any

      Parameters

      • url: string
      • Optional config: AxiosRequestConfig<D>

      Returns Promise<R>

getApplicationCommandPermissions: ((applicationId: string, guildId: string, commandId: string, options?: AxiosRequestConfig<any>) => Promise<GuildApplicationCommandPermission>)

Type declaration

    • (applicationId: string, guildId: string, commandId: string, options?: AxiosRequestConfig<any>): Promise<GuildApplicationCommandPermission>
    • Fetches permissions for a specific command for your application in a guild. Returns a guild application command permissions object.

      Parameters

      • applicationId: string
      • guildId: string
      • commandId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<GuildApplicationCommandPermission>

getApplicationRoleConnectionMetadataRecords: ((applicationId: string, options?: AxiosRequestConfig<any>) => Promise<ApplicationRoleConnectionMetadatum[]>)

Type declaration

getAutoModerationRule: ((guildId: string, autoModerationRuleId: string, options?: AxiosRequestConfig<any>) => Promise<AutoModerationRule>)

Type declaration

    • (guildId: string, autoModerationRuleId: string, options?: AxiosRequestConfig<any>): Promise<AutoModerationRule>
    • Get a single rule. Returns an auto moderation rule object.

      Parameters

      • guildId: string
      • autoModerationRuleId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<AutoModerationRule>

getChannel: ((channelId: string, options?: AxiosRequestConfig<any>) => Promise<Channel>)

Type declaration

    • (channelId: string, options?: AxiosRequestConfig<any>): Promise<Channel>
    • Get a channel by ID. Returns a channel object. If the channel is a thread, a thread member object is included in the returned result.

      Parameters

      • channelId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<Channel>

getChannelInvites: ((channelId: string, options?: AxiosRequestConfig<any>) => Promise<Invite[]>)

Type declaration

    • (channelId: string, options?: AxiosRequestConfig<any>): Promise<Invite[]>
    • Returns a list of invite objects (with invite metadata) for the channel. Only usable for guild channels. Requires the MANAGE_CHANNELS permission.

      Parameters

      • channelId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<Invite[]>

getChannelMessage: ((channelId: string, messageId: string, options?: AxiosRequestConfig<any>) => Promise<Message>)

Type declaration

    • (channelId: string, messageId: string, options?: AxiosRequestConfig<any>): Promise<Message>
    • Retrieves a specific message in the channel. Returns a message object on success.

      Parameters

      • channelId: string
      • messageId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<Message>

getChannelMessages: ((channelId: string, params?: Partial<GetChannelMessageParams>, options?: AxiosRequestConfig<any>) => Promise<Message[]>)

Type declaration

    • (channelId: string, params?: Partial<GetChannelMessageParams>, options?: AxiosRequestConfig<any>): Promise<Message[]>
    • Retrieves the messages in a channel. Returns an array of message objects on success.

      Parameters

      Returns Promise<Message[]>

getChannelWebhooks: ((channelId: string, options?: AxiosRequestConfig<any>) => Promise<Webhook[]>)

Type declaration

    • (channelId: string, options?: AxiosRequestConfig<any>): Promise<Webhook[]>
    • Returns a list of channel webhook objects. Requires the MANAGE_WEBHOOKS permission.

      Parameters

      • channelId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<Webhook[]>

getCurrentAuthorizationInformation: ((options?: AxiosRequestConfig<any>) => Promise<GetCurrentAuthorizationInformationResponse>)

Type declaration

getCurrentBotApplicationInformation: ((options?: AxiosRequestConfig<any>) => Promise<Application>)

Type declaration

    • (options?: AxiosRequestConfig<any>): Promise<Application>
    • Returns the bot's application object.

      Parameters

      • Optional options: AxiosRequestConfig<any>

      Returns Promise<Application>

getCurrentUser: ((options?: AxiosRequestConfig<any>) => Promise<User>)

Type declaration

    • (options?: AxiosRequestConfig<any>): Promise<User>
    • Returns the user object of the requester's account. For OAuth2, this requires the identify scope, which will return the object without an email, and optionally the email scope, which returns the object with an email.

      Parameters

      • Optional options: AxiosRequestConfig<any>

      Returns Promise<User>

getCurrentUserGuildMember: ((guildId: string, options?: AxiosRequestConfig<any>) => Promise<GuildMember>)

Type declaration

    • (guildId: string, options?: AxiosRequestConfig<any>): Promise<GuildMember>
    • Returns a guild member object for the current user. Requires the guilds.members.read OAuth2 scope.

      Parameters

      • guildId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<GuildMember>

getCurrentUserGuilds: ((params?: Partial<GetCurrentUserGuildParams>, options?: AxiosRequestConfig<any>) => Promise<Guild[]>)

Type declaration

    • (params?: Partial<GetCurrentUserGuildParams>, options?: AxiosRequestConfig<any>): Promise<Guild[]>
    • Returns a list of partial guild objects the current user is a member of. Requires the guilds OAuth2 scope.

      Parameters

      Returns Promise<Guild[]>

getFollowupMessage: ((applicationId: string, interactionToken: string, messageId: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (applicationId: string, interactionToken: string, messageId: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Returns a followup message for an Interaction. Functions the same as Get Webhook Message.

      Parameters

      • applicationId: string
      • interactionToken: string
      • messageId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

getGateway: ((options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (options?: AxiosRequestConfig<any>): Promise<any>
    • Parameters

      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

getGatewayBot: ((options?: AxiosRequestConfig<any>) => Promise<GetGatewayBotResponse>)

Type declaration

getGlobalApplicationCommand: ((applicationId: string, commandId: string, options?: AxiosRequestConfig<any>) => Promise<ApplicationCommand>)

Type declaration

    • (applicationId: string, commandId: string, options?: AxiosRequestConfig<any>): Promise<ApplicationCommand>
    • Fetch a global command for your application. Returns an application command object.

      Parameters

      • applicationId: string
      • commandId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<ApplicationCommand>

getGlobalApplicationCommands: ((applicationId: string, params?: Partial<GetGlobalApplicationCommandParams>, options?: AxiosRequestConfig<any>) => Promise<ApplicationCommand[]>)

Type declaration

getGuild: ((guildId: string, params?: Partial<GetGuildParams>, options?: AxiosRequestConfig<any>) => Promise<Guild>)

Type declaration

    • (guildId: string, params?: Partial<GetGuildParams>, options?: AxiosRequestConfig<any>): Promise<Guild>
    • Returns the guild object for the given id. If with_counts is set to true, this endpoint will also return approximate_member_count and approximate_presence_count for the guild.

      Parameters

      • guildId: string
      • Optional params: Partial<GetGuildParams>
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<Guild>

getGuildApplicationCommand: ((applicationId: string, guildId: string, commandId: string, options?: AxiosRequestConfig<any>) => Promise<ApplicationCommand>)

Type declaration

    • (applicationId: string, guildId: string, commandId: string, options?: AxiosRequestConfig<any>): Promise<ApplicationCommand>
    • Fetch a guild command for your application. Returns an application command object.

      Parameters

      • applicationId: string
      • guildId: string
      • commandId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<ApplicationCommand>

getGuildApplicationCommandPermissions: ((applicationId: string, guildId: string, options?: AxiosRequestConfig<any>) => Promise<GuildApplicationCommandPermission[]>)

Type declaration

    • (applicationId: string, guildId: string, options?: AxiosRequestConfig<any>): Promise<GuildApplicationCommandPermission[]>
    • Fetches permissions for all commands for your application in a guild. Returns an array of guild application command permissions objects.

      Parameters

      • applicationId: string
      • guildId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<GuildApplicationCommandPermission[]>

getGuildApplicationCommands: ((applicationId: string, guildId: string, params?: Partial<GetGuildApplicationCommandParams>, options?: AxiosRequestConfig<any>) => Promise<ApplicationCommand[]>)

Type declaration

getGuildAuditLog: ((guildId: string, params?: Partial<GetGuildAuditLogParams>, options?: AxiosRequestConfig<any>) => Promise<AuditLog>)

Type declaration

    • (guildId: string, params?: Partial<GetGuildAuditLogParams>, options?: AxiosRequestConfig<any>): Promise<AuditLog>
    • Returns an audit log object for the guild. Requires the VIEW_AUDIT_LOG permission.

      Parameters

      Returns Promise<AuditLog>

getGuildBan: ((guildId: string, userId: string, options?: AxiosRequestConfig<any>) => Promise<Ban>)

Type declaration

    • (guildId: string, userId: string, options?: AxiosRequestConfig<any>): Promise<Ban>
    • Returns a ban object for the given user or a 404 not found if the ban cannot be found. Requires the BAN_MEMBERS permission.

      Parameters

      • guildId: string
      • userId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<Ban>

getGuildBans: ((guildId: string, params?: Partial<GetGuildBanParams>, options?: AxiosRequestConfig<any>) => Promise<Ban[]>)

Type declaration

    • (guildId: string, params?: Partial<GetGuildBanParams>, options?: AxiosRequestConfig<any>): Promise<Ban[]>
    • Returns a list of ban objects for the users banned from this guild. Requires the BAN_MEMBERS permission.

      Parameters

      • guildId: string
      • Optional params: Partial<GetGuildBanParams>
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<Ban[]>

getGuildChannels: ((guildId: string, options?: AxiosRequestConfig<any>) => Promise<Channel[]>)

Type declaration

    • (guildId: string, options?: AxiosRequestConfig<any>): Promise<Channel[]>
    • Returns a list of guild channel objects. Does not include threads.

      Parameters

      • guildId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<Channel[]>

getGuildEmoji: ((guildId: string, emojiId: string, options?: AxiosRequestConfig<any>) => Promise<Emoji>)

Type declaration

    • (guildId: string, emojiId: string, options?: AxiosRequestConfig<any>): Promise<Emoji>
    • Returns an emoji object for the given guild and emoji IDs.

      Parameters

      • guildId: string
      • emojiId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<Emoji>

getGuildIntegrations: ((guildId: string, options?: AxiosRequestConfig<any>) => Promise<Integration[]>)

Type declaration

    • (guildId: string, options?: AxiosRequestConfig<any>): Promise<Integration[]>
    • Returns a list of integration objects for the guild. Requires the MANAGE_GUILD permission.

      Parameters

      • guildId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<Integration[]>

getGuildInvites: ((guildId: string, options?: AxiosRequestConfig<any>) => Promise<Invite[]>)

Type declaration

    • (guildId: string, options?: AxiosRequestConfig<any>): Promise<Invite[]>
    • Returns a list of invite objects (with invite metadata) for the guild. Requires the MANAGE_GUILD permission.

      Parameters

      • guildId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<Invite[]>

getGuildMember: ((guildId: string, userId: string, options?: AxiosRequestConfig<any>) => Promise<GuildMember>)

Type declaration

    • (guildId: string, userId: string, options?: AxiosRequestConfig<any>): Promise<GuildMember>
    • Returns a guild member object for the specified user.

      Parameters

      • guildId: string
      • userId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<GuildMember>

getGuildOnboarding: ((guildId: string, options?: AxiosRequestConfig<any>) => Promise<GuildOnboarding>)

Type declaration

    • (guildId: string, options?: AxiosRequestConfig<any>): Promise<GuildOnboarding>
    • Returns the Onboarding object for the guild.

      Parameters

      • guildId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<GuildOnboarding>

getGuildPreview: ((guildId: string, options?: AxiosRequestConfig<any>) => Promise<GuildPreview>)

Type declaration

    • (guildId: string, options?: AxiosRequestConfig<any>): Promise<GuildPreview>
    • Returns the guild preview object for the given id. If the user is not in the guild, then the guild must be lurkable.

      Parameters

      • guildId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<GuildPreview>

getGuildPruneCount: ((guildId: string, params?: Partial<GetGuildPruneCountParams>, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (guildId: string, params?: Partial<GetGuildPruneCountParams>, options?: AxiosRequestConfig<any>): Promise<any>
    • Returns an object with one pruned key indicating the number of members that would be removed in a prune operation. Requires the KICK_MEMBERS permission.

      Parameters

      Returns Promise<any>

getGuildRoles: ((guildId: string, options?: AxiosRequestConfig<any>) => Promise<Role[]>)

Type declaration

    • (guildId: string, options?: AxiosRequestConfig<any>): Promise<Role[]>
    • Returns a list of role objects for the guild.

      Parameters

      • guildId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<Role[]>

getGuildScheduledEvent: ((guildId: string, guildScheduledEventId: string, params?: Partial<GetGuildScheduledEventParams>, options?: AxiosRequestConfig<any>) => Promise<GuildScheduledEvent>)

Type declaration

getGuildScheduledEventUsers: ((guildId: string, guildScheduledEventId: string, params?: Partial<GetGuildScheduledEventUserParams>, options?: AxiosRequestConfig<any>) => Promise<GuildScheduledEventUser[]>)

Type declaration

    • (guildId: string, guildScheduledEventId: string, params?: Partial<GetGuildScheduledEventUserParams>, options?: AxiosRequestConfig<any>): Promise<GuildScheduledEventUser[]>
    • Get a list of guild scheduled event users subscribed to a guild scheduled event. Returns a list of guild scheduled event user objects on success. Guild member data, if it exists, is included if the with_member query parameter is set.

      Parameters

      Returns Promise<GuildScheduledEventUser[]>

getGuildSticker: ((guildId: string, stickerId: string, options?: AxiosRequestConfig<any>) => Promise<Sticker>)

Type declaration

    • (guildId: string, stickerId: string, options?: AxiosRequestConfig<any>): Promise<Sticker>
    • Returns a sticker object for the given guild and sticker IDs. Includes the user field if the bot has the MANAGE_GUILD_EXPRESSIONS permission.

      Parameters

      • guildId: string
      • stickerId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<Sticker>

getGuildTemplate: ((templateCode: string, options?: AxiosRequestConfig<any>) => Promise<GuildTemplate>)

Type declaration

    • (templateCode: string, options?: AxiosRequestConfig<any>): Promise<GuildTemplate>
    • Returns a guild template object for the given code.

      Parameters

      • templateCode: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<GuildTemplate>

getGuildTemplates: ((guildId: string, options?: AxiosRequestConfig<any>) => Promise<GuildTemplate[]>)

Type declaration

    • (guildId: string, options?: AxiosRequestConfig<any>): Promise<GuildTemplate[]>
    • Returns an array of guild template objects. Requires the MANAGE_GUILD permission.

      Parameters

      • guildId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<GuildTemplate[]>

getGuildVanityUrl: ((guildId: string, options?: AxiosRequestConfig<any>) => Promise<Invite>)

Type declaration

    • (guildId: string, options?: AxiosRequestConfig<any>): Promise<Invite>
    • Returns a partial invite object for guilds with that feature enabled. Requires the MANAGE_GUILD permission. code will be null if a vanity url for the guild is not set.

      Parameters

      • guildId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<Invite>

getGuildVoiceRegions: ((guildId: string, options?: AxiosRequestConfig<any>) => Promise<VoiceRegion[]>)

Type declaration

    • (guildId: string, options?: AxiosRequestConfig<any>): Promise<VoiceRegion[]>
    • Returns a list of voice region objects for the guild. Unlike the similar /voice route, this returns VIP servers when the guild is VIP-enabled.

      Parameters

      • guildId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<VoiceRegion[]>

getGuildWebhooks: ((guildId: string, options?: AxiosRequestConfig<any>) => Promise<Webhook[]>)

Type declaration

    • (guildId: string, options?: AxiosRequestConfig<any>): Promise<Webhook[]>
    • Returns a list of guild webhook objects. Requires the MANAGE_WEBHOOKS permission.

      Parameters

      • guildId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<Webhook[]>

getGuildWelcomeScreen: ((guildId: string, options?: AxiosRequestConfig<any>) => Promise<WelcomeScreen>)

Type declaration

    • (guildId: string, options?: AxiosRequestConfig<any>): Promise<WelcomeScreen>
    • Returns the Welcome Screen object for the guild. If the welcome screen is not enabled, the MANAGE_GUILD permission is required.

      Parameters

      • guildId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<WelcomeScreen>

getGuildWidget: ((guildId: string, options?: AxiosRequestConfig<any>) => Promise<GuildWidget>)

Type declaration

    • (guildId: string, options?: AxiosRequestConfig<any>): Promise<GuildWidget>
    • Returns the widget for the guild.

      Parameters

      • guildId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<GuildWidget>

getGuildWidgetImage: ((guildId: string, params?: Partial<GetGuildWidgetImageParams>, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (guildId: string, params?: Partial<GetGuildWidgetImageParams>, options?: AxiosRequestConfig<any>): Promise<any>
    • Returns a PNG image widget for the guild. Requires no permissions or authentication.

      Parameters

      Returns Promise<any>

getGuildWidgetSettings: ((guildId: string, options?: AxiosRequestConfig<any>) => Promise<GuildWidgetSetting>)

Type declaration

    • (guildId: string, options?: AxiosRequestConfig<any>): Promise<GuildWidgetSetting>
    • Returns a guild widget settings object. Requires the MANAGE_GUILD permission.

      Parameters

      • guildId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<GuildWidgetSetting>

getInvite: ((inviteCode: string, params?: Partial<GetInviteParams>, options?: AxiosRequestConfig<any>) => Promise<Invite>)

Type declaration

    • (inviteCode: string, params?: Partial<GetInviteParams>, options?: AxiosRequestConfig<any>): Promise<Invite>
    • Returns an invite object for the given code.

      Parameters

      • inviteCode: string
      • Optional params: Partial<GetInviteParams>
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<Invite>

getOriginalInteractionResponse: ((applicationId: string, interactionToken: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (applicationId: string, interactionToken: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Returns the initial Interaction response. Functions the same as Get Webhook Message.

      Parameters

      • applicationId: string
      • interactionToken: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

getPinnedMessages: ((channelId: string, options?: AxiosRequestConfig<any>) => Promise<Message[]>)

Type declaration

    • (channelId: string, options?: AxiosRequestConfig<any>): Promise<Message[]>
    • Returns all pinned messages in the channel as an array of message objects.

      Parameters

      • channelId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<Message[]>

getReactions: ((channelId: string, messageId: string, emoji: string, params?: Partial<GetReactionParams>, options?: AxiosRequestConfig<any>) => Promise<User[]>)

Type declaration

    • (channelId: string, messageId: string, emoji: string, params?: Partial<GetReactionParams>, options?: AxiosRequestConfig<any>): Promise<User[]>
    • Get a list of users that reacted with this emoji. Returns an array of user objects on success. The emoji must be URL Encoded or the request will fail with 10014: Unknown Emoji. To use custom emoji, you must encode it in the format name:id with the emoji name and emoji id.

      Parameters

      • channelId: string
      • messageId: string
      • emoji: string
      • Optional params: Partial<GetReactionParams>
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<User[]>

getStageInstance: ((channelId: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (channelId: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Gets the stage instance associated with the Stage channel, if it exists.

      Parameters

      • channelId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

getSticker: ((stickerId: string, options?: AxiosRequestConfig<any>) => Promise<Sticker>)

Type declaration

    • (stickerId: string, options?: AxiosRequestConfig<any>): Promise<Sticker>
    • Returns a sticker object for the given sticker ID.

      Parameters

      • stickerId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<Sticker>

getThreadMember: ((channelId: string, userId: string, params?: Partial<GetThreadMemberParams>, options?: AxiosRequestConfig<any>) => Promise<ThreadMember>)

Type declaration

    • (channelId: string, userId: string, params?: Partial<GetThreadMemberParams>, options?: AxiosRequestConfig<any>): Promise<ThreadMember>
    • Returns a thread member object for the specified user if they are a member of the thread, returns a 404 response otherwise.

      Parameters

      • channelId: string
      • userId: string
      • Optional params: Partial<GetThreadMemberParams>
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<ThreadMember>

getUser: ((userId: string, options?: AxiosRequestConfig<any>) => Promise<User>)

Type declaration

    • (userId: string, options?: AxiosRequestConfig<any>): Promise<User>
    • Returns a user object for a given user ID.

      Parameters

      • userId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<User>

getUserApplicationRoleConnection: ((applicationId: string, options?: AxiosRequestConfig<any>) => Promise<ApplicationRoleConnection>)

Type declaration

    • (applicationId: string, options?: AxiosRequestConfig<any>): Promise<ApplicationRoleConnection>
    • Returns the application role connection for the user. Requires an OAuth2 access token with role_connections.write scope for the application specified in the path.

      Parameters

      • applicationId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<ApplicationRoleConnection>

getUserConnections: ((options?: AxiosRequestConfig<any>) => Promise<Connection[]>)

Type declaration

    • (options?: AxiosRequestConfig<any>): Promise<Connection[]>
    • Returns a list of connection objects. Requires the connections OAuth2 scope.

      Parameters

      • Optional options: AxiosRequestConfig<any>

      Returns Promise<Connection[]>

getWebhook: ((webhookId: string, options?: AxiosRequestConfig<any>) => Promise<Webhook>)

Type declaration

    • (webhookId: string, options?: AxiosRequestConfig<any>): Promise<Webhook>
    • Returns the new webhook object for the given id.

      Parameters

      • webhookId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<Webhook>

getWebhookMessage: ((webhookId: string, webhookToken: string, messageId: string, params?: Partial<GetWebhookMessageParams>, options?: AxiosRequestConfig<any>) => Promise<Message>)

Type declaration

    • (webhookId: string, webhookToken: string, messageId: string, params?: Partial<GetWebhookMessageParams>, options?: AxiosRequestConfig<any>): Promise<Message>
    • Returns a previously-sent webhook message from the same token. Returns a message object on success.

      Parameters

      • webhookId: string
      • webhookToken: string
      • messageId: string
      • Optional params: Partial<GetWebhookMessageParams>
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<Message>

getWebhookWithToken: ((webhookId: string, webhookToken: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (webhookId: string, webhookToken: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Same as above, except this call does not require authentication and returns no user in the webhook object.

      Parameters

      • webhookId: string
      • webhookToken: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

groupDmAddRecipient: ((channelId: string, userId: string, params?: Partial<GroupDmAddRecipientParams>, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (channelId: string, userId: string, params?: Partial<GroupDmAddRecipientParams>, options?: AxiosRequestConfig<any>): Promise<any>
    • Adds a recipient to a Group DM using their access token.

      Parameters

      • channelId: string
      • userId: string
      • Optional params: Partial<GroupDmAddRecipientParams>
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

groupDmRemoveRecipient: ((channelId: string, userId: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (channelId: string, userId: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Removes a recipient from a Group DM.

      Parameters

      • channelId: string
      • userId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

joinThread: ((channelId: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (channelId: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Adds the current user to a thread. Also requires the thread is not archived. Returns a 204 empty response on success. Fires a Thread Members Update and a Thread Create Gateway event.

      Parameters

      • channelId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

leaveGuild: ((guildId: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (guildId: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Leave a guild. Returns a 204 empty response on success. Fires a Guild Delete Gateway event and a Guild Member Remove Gateway event.

      Parameters

      • guildId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

leaveThread: ((channelId: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (channelId: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Removes the current user from a thread. Also requires the thread is not archived. Returns a 204 empty response on success. Fires a Thread Members Update Gateway event.

      Parameters

      • channelId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

listActiveGuildThreads: ((guildId: string, options?: AxiosRequestConfig<any>) => Promise<ListActiveGuildThreadResponse>)

Type declaration

    • (guildId: string, options?: AxiosRequestConfig<any>): Promise<ListActiveGuildThreadResponse>
    • Returns all active threads in the guild, including public and private threads. Threads are ordered by their id, in descending order.

      Parameters

      • guildId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<ListActiveGuildThreadResponse>

listAutoModerationRulesForGuild: ((guildId: string, options?: AxiosRequestConfig<any>) => Promise<AutoModerationRule[]>)

Type declaration

    • (guildId: string, options?: AxiosRequestConfig<any>): Promise<AutoModerationRule[]>
    • Get a list of all rules currently configured for the guild. Returns a list of auto moderation rule objects for the given guild.

      Parameters

      • guildId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<AutoModerationRule[]>

listGuildEmojis: ((guildId: string, options?: AxiosRequestConfig<any>) => Promise<Emoji[]>)

Type declaration

    • (guildId: string, options?: AxiosRequestConfig<any>): Promise<Emoji[]>
    • Returns a list of emoji objects for the given guild.

      Parameters

      • guildId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<Emoji[]>

listGuildMembers: ((guildId: string, params?: Partial<ListGuildMemberParams>, options?: AxiosRequestConfig<any>) => Promise<GuildMember[]>)

Type declaration

    • (guildId: string, params?: Partial<ListGuildMemberParams>, options?: AxiosRequestConfig<any>): Promise<GuildMember[]>
    • Returns a list of guild member objects that are members of the guild.

      Parameters

      • guildId: string
      • Optional params: Partial<ListGuildMemberParams>
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<GuildMember[]>

listGuildStickers: ((guildId: string, options?: AxiosRequestConfig<any>) => Promise<Sticker[]>)

Type declaration

    • (guildId: string, options?: AxiosRequestConfig<any>): Promise<Sticker[]>
    • Returns an array of sticker objects for the given guild. Includes user fields if the bot has the MANAGE_GUILD_EXPRESSIONS permission.

      Parameters

      • guildId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<Sticker[]>

listJoinedPrivateArchivedThreads: ((channelId: string, params?: Partial<ListJoinedPrivateArchivedThreadParams>, options?: AxiosRequestConfig<any>) => Promise<ListJoinedPrivateArchivedThreadResponse>)

Type declaration

listNitroStickerPacks: ((options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (options?: AxiosRequestConfig<any>): Promise<any>
    • Returns the list of sticker packs available to Nitro subscribers.

      Parameters

      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

listPrivateArchivedThreads: ((channelId: string, params?: Partial<ListPrivateArchivedThreadParams>, options?: AxiosRequestConfig<any>) => Promise<ListPrivateArchivedThreadResponse>)

Type declaration

listPublicArchivedThreads: ((channelId: string, params?: Partial<ListPublicArchivedThreadParams>, options?: AxiosRequestConfig<any>) => Promise<ListPublicArchivedThreadResponse>)

Type declaration

    • (channelId: string, params?: Partial<ListPublicArchivedThreadParams>, options?: AxiosRequestConfig<any>): Promise<ListPublicArchivedThreadResponse>
    • Returns archived threads in the channel that are public. When called on a GUILD_TEXT channel, returns threads of type PUBLIC_THREAD. When called on a GUILD_ANNOUNCEMENT channel returns threads of type ANNOUNCEMENT_THREAD. Threads are ordered by archive_timestamp, in descending order. Requires the READ_MESSAGE_HISTORY permission.

      Parameters

      Returns Promise<ListPublicArchivedThreadResponse>

listScheduledEventsForGuild: ((guildId: string, params?: Partial<ListScheduledEventsForGuildParams>, options?: AxiosRequestConfig<any>) => Promise<GuildScheduledEvent[]>)

Type declaration

listThreadMembers: ((channelId: string, params?: Partial<ListThreadMemberParams>, options?: AxiosRequestConfig<any>) => Promise<ThreadMember[]>)

Type declaration

listVoiceRegions: ((options?: AxiosRequestConfig<any>) => Promise<VoiceRegion[]>)

Type declaration

    • (options?: AxiosRequestConfig<any>): Promise<VoiceRegion[]>
    • Returns an array of voice region objects that can be used when setting a voice or stage channel's rtc_region.

      Parameters

      • Optional options: AxiosRequestConfig<any>

      Returns Promise<VoiceRegion[]>

modifyAutoModerationRule: ((guildId: string, autoModerationRuleId: string, params?: Partial<ModifyAutoModerationRuleParams>, options?: AxiosRequestConfig<any>) => Promise<AutoModerationRule>)

Type declaration

modifyChannel: ((channelId: string, params?: Partial<ModifyChannelParams>, options?: AxiosRequestConfig<any>) => Promise<Channel>)

Type declaration

    • (channelId: string, params?: Partial<ModifyChannelParams>, options?: AxiosRequestConfig<any>): Promise<Channel>
    • Update a channel's settings. Returns a channel on success, and a 400 BAD REQUEST on invalid parameters. All JSON parameters are optional.

      Parameters

      • channelId: string
      • Optional params: Partial<ModifyChannelParams>
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<Channel>

modifyCurrentMember: ((guildId: string, params?: Partial<ModifyCurrentMemberParams>, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (guildId: string, params?: Partial<ModifyCurrentMemberParams>, options?: AxiosRequestConfig<any>): Promise<any>
    • Modifies the current member in a guild. Returns a 200 with the updated member object on success. Fires a Guild Member Update Gateway event.

      Parameters

      Returns Promise<any>

modifyCurrentUser: ((params?: Partial<ModifyCurrentUserParams>, options?: AxiosRequestConfig<any>) => Promise<User>)

Type declaration

    • (params?: Partial<ModifyCurrentUserParams>, options?: AxiosRequestConfig<any>): Promise<User>
    • Modify the requester's user account settings. Returns a user object on success. Fires a User Update Gateway event.

      Parameters

      Returns Promise<User>

modifyCurrentUserNick: ((guildId: string, params?: Partial<ModifyCurrentUserNickParams>, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

modifyCurrentUserVoiceState: ((guildId: string, params?: Partial<ModifyCurrentUserVoiceStateParams>, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (guildId: string, params?: Partial<ModifyCurrentUserVoiceStateParams>, options?: AxiosRequestConfig<any>): Promise<any>
    • Updates the current user's voice state. Returns 204 No Content on success. Fires a Voice State Update Gateway event.

      Parameters

      Returns Promise<any>

modifyGuild: ((guildId: string, params?: Partial<ModifyGuildParams>, options?: AxiosRequestConfig<any>) => Promise<Guild>)

Type declaration

    • (guildId: string, params?: Partial<ModifyGuildParams>, options?: AxiosRequestConfig<any>): Promise<Guild>
    • Modify a guild's settings. Requires the MANAGE_GUILD permission. Returns the updated guild object on success. Fires a Guild Update Gateway event.

      Parameters

      • guildId: string
      • Optional params: Partial<ModifyGuildParams>
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<Guild>

modifyGuildChannelPositions: ((guildId: string, params?: Partial<ModifyGuildChannelPositionParams>, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (guildId: string, params?: Partial<ModifyGuildChannelPositionParams>, options?: AxiosRequestConfig<any>): Promise<any>
    • Modify the positions of a set of channel objects for the guild. Requires MANAGE_CHANNELS permission. Returns a 204 empty response on success. Fires multiple Channel Update Gateway events.

      Parameters

      Returns Promise<any>

modifyGuildEmoji: ((guildId: string, emojiId: string, params?: Partial<ModifyGuildEmojiParams>, options?: AxiosRequestConfig<any>) => Promise<Emoji>)

Type declaration

    • (guildId: string, emojiId: string, params?: Partial<ModifyGuildEmojiParams>, options?: AxiosRequestConfig<any>): Promise<Emoji>
    • Modify the given emoji. Requires the MANAGE_GUILD_EXPRESSIONS permission. Returns the updated emoji object on success. Fires a Guild Emojis Update Gateway event.

      Parameters

      • guildId: string
      • emojiId: string
      • Optional params: Partial<ModifyGuildEmojiParams>
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<Emoji>

modifyGuildMember: ((guildId: string, userId: string, params?: Partial<ModifyGuildMemberParams>, options?: AxiosRequestConfig<any>) => Promise<GuildMember>)

Type declaration

    • (guildId: string, userId: string, params?: Partial<ModifyGuildMemberParams>, options?: AxiosRequestConfig<any>): Promise<GuildMember>
    • Modify attributes of a guild member. Returns a 200 OK with the guild member as the body. Fires a Guild Member Update Gateway event. If the channel_id is set to null, this will force the target user to be disconnected from voice.

      Parameters

      • guildId: string
      • userId: string
      • Optional params: Partial<ModifyGuildMemberParams>
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<GuildMember>

modifyGuildMfaLevel: ((guildId: string, params?: Partial<ModifyGuildMfaLevelParams>, options?: AxiosRequestConfig<any>) => Promise<MfaLevel>)

Type declaration

    • (guildId: string, params?: Partial<ModifyGuildMfaLevelParams>, options?: AxiosRequestConfig<any>): Promise<MfaLevel>
    • Modify a guild's MFA level. Requires guild ownership. Returns the updated level on success. Fires a Guild Update Gateway event.

      Parameters

      Returns Promise<MfaLevel>

modifyGuildRole: ((guildId: string, roleId: string, params?: Partial<ModifyGuildRoleParams>, options?: AxiosRequestConfig<any>) => Promise<Role>)

Type declaration

    • (guildId: string, roleId: string, params?: Partial<ModifyGuildRoleParams>, options?: AxiosRequestConfig<any>): Promise<Role>
    • Modify a guild role. Requires the MANAGE_ROLES permission. Returns the updated role on success. Fires a Guild Role Update Gateway event.

      Parameters

      • guildId: string
      • roleId: string
      • Optional params: Partial<ModifyGuildRoleParams>
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<Role>

modifyGuildRolePositions: ((guildId: string, params?: Partial<ModifyGuildRolePositionParams>, options?: AxiosRequestConfig<any>) => Promise<Role[]>)

Type declaration

    • (guildId: string, params?: Partial<ModifyGuildRolePositionParams>, options?: AxiosRequestConfig<any>): Promise<Role[]>
    • Modify the positions of a set of role objects for the guild. Requires the MANAGE_ROLES permission. Returns a list of all of the guild's role objects on success. Fires multiple Guild Role Update Gateway events.

      Parameters

      Returns Promise<Role[]>

modifyGuildScheduledEvent: ((guildId: string, guildScheduledEventId: string, params?: Partial<ModifyGuildScheduledEventParams>, options?: AxiosRequestConfig<any>) => Promise<GuildScheduledEvent>)

Type declaration

    • (guildId: string, guildScheduledEventId: string, params?: Partial<ModifyGuildScheduledEventParams>, options?: AxiosRequestConfig<any>): Promise<GuildScheduledEvent>
    • Modify a guild scheduled event. Returns the modified guild scheduled event object on success. Fires a Guild Scheduled Event Update Gateway event.

      Parameters

      Returns Promise<GuildScheduledEvent>

modifyGuildSticker: ((guildId: string, stickerId: string, params?: Partial<ModifyGuildStickerParams>, options?: AxiosRequestConfig<any>) => Promise<Sticker>)

Type declaration

    • (guildId: string, stickerId: string, params?: Partial<ModifyGuildStickerParams>, options?: AxiosRequestConfig<any>): Promise<Sticker>
    • Modify the given sticker. Requires the MANAGE_GUILD_EXPRESSIONS permission. Returns the updated sticker object on success. Fires a Guild Stickers Update Gateway event.

      Parameters

      • guildId: string
      • stickerId: string
      • Optional params: Partial<ModifyGuildStickerParams>
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<Sticker>

modifyGuildTemplate: ((guildId: string, templateCode: string, params?: Partial<ModifyGuildTemplateParams>, options?: AxiosRequestConfig<any>) => Promise<GuildTemplate>)

Type declaration

    • (guildId: string, templateCode: string, params?: Partial<ModifyGuildTemplateParams>, options?: AxiosRequestConfig<any>): Promise<GuildTemplate>
    • Modifies the template's metadata. Requires the MANAGE_GUILD permission. Returns the guild template object on success.

      Parameters

      • guildId: string
      • templateCode: string
      • Optional params: Partial<ModifyGuildTemplateParams>
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<GuildTemplate>

modifyGuildWelcomeScreen: ((guildId: string, params?: Partial<ModifyGuildWelcomeScreenParams>, options?: AxiosRequestConfig<any>) => Promise<WelcomeScreen>)

Type declaration

    • (guildId: string, params?: Partial<ModifyGuildWelcomeScreenParams>, options?: AxiosRequestConfig<any>): Promise<WelcomeScreen>
    • Modify the guild's Welcome Screen. Requires the MANAGE_GUILD permission. Returns the updated Welcome Screen object. May fire a Guild Update Gateway event.

      Parameters

      Returns Promise<WelcomeScreen>

modifyGuildWidget: ((guildId: string, options?: AxiosRequestConfig<any>) => Promise<GuildWidgetSetting>)

Type declaration

    • (guildId: string, options?: AxiosRequestConfig<any>): Promise<GuildWidgetSetting>
    • Modify a guild widget settings object for the guild. All attributes may be passed in with JSON and modified. Requires the MANAGE_GUILD permission. Returns the updated guild widget object.

      Parameters

      • guildId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<GuildWidgetSetting>

modifyStageInstance: ((channelId: string, params?: Partial<ModifyStageInstanceParams>, options?: AxiosRequestConfig<any>) => Promise<StageInstance>)

Type declaration

    • (channelId: string, params?: Partial<ModifyStageInstanceParams>, options?: AxiosRequestConfig<any>): Promise<StageInstance>
    • Updates fields of an existing Stage instance. Returns the updated Stage instance. Fires a Stage Instance Update Gateway event.

      Parameters

      Returns Promise<StageInstance>

modifyUserVoiceState: ((guildId: string, userId: string, params?: Partial<ModifyUserVoiceStateParams>, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (guildId: string, userId: string, params?: Partial<ModifyUserVoiceStateParams>, options?: AxiosRequestConfig<any>): Promise<any>
    • Updates another user's voice state. Fires a Voice State Update Gateway event.

      Parameters

      Returns Promise<any>

modifyWebhook: ((webhookId: string, params?: Partial<ModifyWebhookParams>, options?: AxiosRequestConfig<any>) => Promise<Webhook>)

Type declaration

    • (webhookId: string, params?: Partial<ModifyWebhookParams>, options?: AxiosRequestConfig<any>): Promise<Webhook>
    • Modify a webhook. Requires the MANAGE_WEBHOOKS permission. Returns the updated webhook object on success. Fires a Webhooks Update Gateway event.

      Parameters

      • webhookId: string
      • Optional params: Partial<ModifyWebhookParams>
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<Webhook>

modifyWebhookWithToken: ((webhookId: string, webhookToken: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (webhookId: string, webhookToken: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Same as above, except this call does not require authentication, does not accept a channel_id parameter in the body, and does not return a user in the webhook object.

      Parameters

      • webhookId: string
      • webhookToken: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

patch: (<T, R, D>(url: string, data?: D, config?: AxiosRequestConfig<D>) => Promise<R>)

Type declaration

    • <T, R, D>(url: string, data?: D, config?: AxiosRequestConfig<D>): Promise<R>
    • Type Parameters

      • T = any

      • R = AxiosResponse<T, any>

      • D = any

      Parameters

      • url: string
      • Optional data: D
      • Optional config: AxiosRequestConfig<D>

      Returns Promise<R>

pinMessage: ((channelId: string, messageId: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (channelId: string, messageId: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Pin a message in a channel. Requires the MANAGE_MESSAGES permission. Returns a 204 empty response on success. Fires a Channel Pins Update Gateway event.

      Parameters

      • channelId: string
      • messageId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

post: (<T, R, D>(url: string, data?: D, config?: AxiosRequestConfig<D>) => Promise<R>)

Type declaration

    • <T, R, D>(url: string, data?: D, config?: AxiosRequestConfig<D>): Promise<R>
    • Type Parameters

      • T = any

      • R = AxiosResponse<T, any>

      • D = any

      Parameters

      • url: string
      • Optional data: D
      • Optional config: AxiosRequestConfig<D>

      Returns Promise<R>

put: (<T, R, D>(url: string, data?: D, config?: AxiosRequestConfig<D>) => Promise<R>)

Type declaration

    • <T, R, D>(url: string, data?: D, config?: AxiosRequestConfig<D>): Promise<R>
    • Type Parameters

      • T = any

      • R = AxiosResponse<T, any>

      • D = any

      Parameters

      • url: string
      • Optional data: D
      • Optional config: AxiosRequestConfig<D>

      Returns Promise<R>

removeGuildBan: ((guildId: string, userId: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (guildId: string, userId: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Remove the ban for a user. Requires the BAN_MEMBERS permissions. Returns a 204 empty response on success. Fires a Guild Ban Remove Gateway event.

      Parameters

      • guildId: string
      • userId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

removeGuildMember: ((guildId: string, userId: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (guildId: string, userId: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Remove a member from a guild. Requires KICK_MEMBERS permission. Returns a 204 empty response on success. Fires a Guild Member Remove Gateway event.

      Parameters

      • guildId: string
      • userId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

removeGuildMemberRole: ((guildId: string, userId: string, roleId: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (guildId: string, userId: string, roleId: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Removes a role from a guild member. Requires the MANAGE_ROLES permission. Returns a 204 empty response on success. Fires a Guild Member Update Gateway event.

      Parameters

      • guildId: string
      • userId: string
      • roleId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

removeThreadMember: ((channelId: string, userId: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (channelId: string, userId: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Removes another member from a thread. Requires the MANAGE_THREADS permission, or the creator of the thread if it is a PRIVATE_THREAD. Also requires the thread is not archived. Returns a 204 empty response on success. Fires a Thread Members Update Gateway event.

      Parameters

      • channelId: string
      • userId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

request: (<T, R, D>(config: AxiosRequestConfig<D>) => Promise<R>)

Type declaration

    • <T, R, D>(config: AxiosRequestConfig<D>): Promise<R>
    • Type Parameters

      • T = any

      • R = AxiosResponse<T, any>

      • D = any

      Parameters

      • config: AxiosRequestConfig<D>

      Returns Promise<R>

searchGuildMembers: ((guildId: string, params?: Partial<SearchGuildMemberParams>, options?: AxiosRequestConfig<any>) => Promise<GuildMember[]>)

Type declaration

    • (guildId: string, params?: Partial<SearchGuildMemberParams>, options?: AxiosRequestConfig<any>): Promise<GuildMember[]>
    • Returns a list of guild member objects whose username or nickname starts with a provided string.

      Parameters

      Returns Promise<GuildMember[]>

startThreadFromMessage: ((channelId: string, messageId: string, params?: Partial<StartThreadFromMessageParams>, options?: AxiosRequestConfig<any>) => Promise<Channel>)

Type declaration

    • (channelId: string, messageId: string, params?: Partial<StartThreadFromMessageParams>, options?: AxiosRequestConfig<any>): Promise<Channel>
    • Creates a new thread from an existing message. Returns a channel on success, and a 400 BAD REQUEST on invalid parameters. Fires a Thread Create and a Message Update Gateway event.

      Parameters

      Returns Promise<Channel>

startThreadInForumChannel: ((channelId: string, params?: Partial<StartThreadInForumChannelParams>, options?: AxiosRequestConfig<any>) => Promise<Channel>)

Type declaration

    • (channelId: string, params?: Partial<StartThreadInForumChannelParams>, options?: AxiosRequestConfig<any>): Promise<Channel>
    • Creates a new thread in a forum channel, and sends a message within the created thread. Returns a channel, with a nested message object, on success, and a 400 BAD REQUEST on invalid parameters. Fires a Thread Create and Message Create Gateway event.

      Parameters

      Returns Promise<Channel>

startThreadWithoutMessage: ((channelId: string, params?: Partial<StartThreadWithoutMessageParams>, options?: AxiosRequestConfig<any>) => Promise<Channel>)

Type declaration

    • (channelId: string, params?: Partial<StartThreadWithoutMessageParams>, options?: AxiosRequestConfig<any>): Promise<Channel>
    • Creates a new thread that is not connected to an existing message. Returns a channel on success, and a 400 BAD REQUEST on invalid parameters. Fires a Thread Create Gateway event.

      Parameters

      Returns Promise<Channel>

syncGuildTemplate: ((guildId: string, templateCode: string, options?: AxiosRequestConfig<any>) => Promise<GuildTemplate>)

Type declaration

    • (guildId: string, templateCode: string, options?: AxiosRequestConfig<any>): Promise<GuildTemplate>
    • Syncs the template to the guild's current state. Requires the MANAGE_GUILD permission. Returns the guild template object on success.

      Parameters

      • guildId: string
      • templateCode: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<GuildTemplate>

triggerTypingIndicator: ((channelId: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (channelId: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Post a typing indicator for the specified channel. Generally bots should not implement 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. Returns a 204 empty response on success. Fires a Typing Start Gateway event.

      Parameters

      • channelId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

unpinMessage: ((channelId: string, messageId: string, options?: AxiosRequestConfig<any>) => Promise<any>)

Type declaration

    • (channelId: string, messageId: string, options?: AxiosRequestConfig<any>): Promise<any>
    • Unpin a message in a channel. Requires the MANAGE_MESSAGES permission. Returns a 204 empty response on success. Fires a Channel Pins Update Gateway event.

      Parameters

      • channelId: string
      • messageId: string
      • Optional options: AxiosRequestConfig<any>

      Returns Promise<any>

updateApplicationRoleConnectionMetadataRecords: ((applicationId: string, options?: AxiosRequestConfig<any>) => Promise<ApplicationRoleConnectionMetadatum[]>)

Type declaration

updateUserApplicationRoleConnection: ((applicationId: string, params?: Partial<UpdateUserApplicationRoleConnectionParams>, options?: AxiosRequestConfig<any>) => Promise<ApplicationRoleConnection>)

Type declaration

Generated using TypeDoc