Skip to main content

@sapphire/discord-utilities

Classes

ClassDescription
InteractionOptionResolverUtility class for resolving command interaction options while working with the raw API. Based on https://github.com/discordjs/discord.js/blob/main/packages/discord.js/src/structures/CommandInteractionOptionResolver.js

Variables

VariableDescription
ActionMetadataLimitsNamespace containing limits related to Discord Auto Moderation Action Metadata.
AllowedMentionsLimitsNamespace containing limits related to Discord Message Allowed Mentions.
ApplicationCommandLimitsNamespace containing limits related to Discord application commands (slash commands).
ApplicationCommandOptionLimitsNamespace containing limits related to Choices of Discord Application Commands.
ApplicationCommandPermissionLimitsNamespace containing limits related to Permissions of Discord Application Commands.
ApplicationRoleConnectionLimitsNamespace containing limits related to Discord Application Role Connections.
AutoCompleteLimitsNamespace container limits related to Discord autocomplete interactions.
AutoModerationRuleLimitsNamespace containing limits related to Discord Auto Moderation Rules.
ButtonLimitsNamespace containing limits related to Message Buttons.
ChannelInviteLimitsNamespace containing limits related to Discord Channel Invites.
ChannelLimitsNamespace containing limits related to Discord channels.
ChannelMentionRegexRegex that can capture the ID in Discord Channel mentions
ChannelMessageRegexRegex that can capture the channel and message IDs in a channelId-messageId pattern This pattern can be found when you hold Shift and hover over a message, and click the "ID" button
DiscordHostnameRegexRegex that matches links on the known Discord host names
DiscordInviteLinkRegexRegex that can can capture the code of Discord invite links
EmbedLimitsNamespace containing limits related to Discord embeds.
EmojiLimitsNamespace containing limits related to Discord emojis.
EmojiRegexRegex that can capture the ID of any animated or non-animated custom Discord emoji
FormattedCustomEmojiRegex that matches any animated or non-animated custom Discord emoji. Unlike EmojiRegex It can be a substring of a larger string.
FormattedCustomEmojiWithGroupsRegex that can capture any animated or non-animated custom Discord emoji. Similar to FormattedCustomEmoji and unlike EmojiRegex can also be a substring of a larger string.
GuildAuditLogsLimitsNamespace containing limits related to Discord Guild Audit Logs.
GuildBansLimitsNamespace containing limits related to Discord guild bans.
GuildIntegrationLimitsNamespace containing limits related to Discord Guild Integrations.
GuildLimitsNamespace containing limits related to Discord guilds.
GuildMemberLimitsNamespace containing limits related to Discord guild members.
GuildScheduledEventLimitsNamespace containing limits related to Discord guild scheduled events.
HttpUrlRegexRegex that matches any URL starting with http or https
InteractionLimitsNamespace containing limits related to Discord interactions.
MessageLimitsNamespace containing limits related to Discord messages.
MessageLinkRegexRegex that can capture the Guild, Channel, and Message ID based on a shareable Discord message link.
ModalLimitsNamespace containing limits related to Discord Modals.
ModerationLimitsNamespace containing limits related to built-in moderation features.
ParsedCustomEmojiRegex that matches any animated or non-animated custom Discord emoji *without the wrapping <...> symbols. This means that a string that matches this regex can directly be send inside a Discord message. Other than this difference it is similar to FormattedCustomEmoji.
ParsedCustomEmojiWithGroupsRegex that matches any animated or non-animated custom Discord emoji *without the wrapping <...> symbols. This means that a string that matches this regex can directly be send inside a Discord message. Other than this difference it is similar to FormattedCustomEmojiWithGroups.
PremiumGuildLimitsNamespace containing limits related to premium Discord guilds.
ReactionLimitsNamespace containing limits related to Discord message reactions.
RoleLimitsNamespace containing limits related to Discord roles.
RoleMentionRegexRegex that can capture the ID in Discord Role mentions
SelectMenuLimitsNamespace containing limits related to Select Menus.
SnowflakeRegexRegex that can capture any Discord Snowflake ID
StageChannelLimitsNamespace containing limits related to Discord stage channels.
StickerLimitsNamespace containing limits related to Discord Stickers.
TextChannelLimitsNamespace containing limits related to Discord text channels.
TextInputLimitsNamespace containing limits related to Discord Modal Text Input component.
ThreadLimitsNamespace containing limits related to Discord threads.
TokenRegexRegex that can capture a Discord Token
TriggerMetadataLimitsNamespace containing limits related to Discord Auto Moderation Trigger Metadata.
TriggerTypeLimitsNamespace containing limits related to Discord Auto Moderation Triggers.
TwemojiRegexRegex that can capture a Twemoji (Twitter Emoji)
UserLimitsNamespace containing limits related to Discord users and Direct Messages.
UserOrMemberMentionRegexRegex that can capture the ID of a user in Discord user mentions
VoiceChannelLimitsNamespace containing limits related to Discord voice channels.
WebSocketUrlRegexRegex that matches any WebSocket URL starting with ws or wss
WebhookRegexRegex that captures the Webhook ID and token from a Discord Webhook URL.