Skip to main content

@sapphire/framework v5.2.1

Namespaces

NamespaceDescription
AllFlowsPrecondition-
ApplicationCommandRegistry-
Argument-
ArgumentError-
AutocompleteCommand-
ChatInputCommand-
Command-
ContextMenuCommand-
CorePreconditions-
InteractionHandler-
Listener-
MessageCommand-
Precondition-
PreconditionError-
PreconditionResolvers-
Resolvers-
UserError-

Enumerations

EnumerationDescription
BucketScopeThe scope the cooldown applies to.
CommandOptionsRunTypeEnumThe allowed values for CommandOptions.runIn as an enum.
CommandPreConditionsThe available command pre-conditions.
CooldownLevel-
Identifiers-
InteractionHandlerTypes-
InternalRegistryAPIType-
LogLevelThe logger levels for the ILogger.
PluginHook-
PreconditionRunConditionThe condition for a PreconditionContainerArray.
PreconditionRunModeThe run mode for a PreconditionContainerArray.
RegisterBehavior-

Classes

ClassDescription
AllFlowsPrecondition-
ApplicationCommandRegistry-
ArgsThe argument parser to be used in Command.
ArgumentThe base argument class. This class is abstract and is to be extended by subclasses implementing the methods. In Sapphire's workflow, arguments are called when using Args's methods (usually used inside Commands by default).
ArgumentErrorErrors thrown by the argument parser
ArgumentStore-
ClientPermissionsPreconditionConstructs a contextful permissions precondition requirement.
Command-
CommandStoreStores all Command pieces
InteractionHandler-
InteractionHandlerStore-
ListenerThe base event class. This class is abstract and is to be extended by subclasses, which should implement the methods. In Sapphire's workflow, listeners are called when the emitter they listen on emits a new message with the same event name.
ListenerLoaderStrategy-
ListenerStore-
Logger-
Plugin-
PluginManager-
Precondition-
PreconditionContainerArrayAn IPreconditionContainer that defines an array of multiple IPreconditionContainers.
PreconditionContainerSingleAn IPreconditionContainer which runs a single precondition from SapphireClient.preconditions.
PreconditionErrorErrors thrown by preconditions
PreconditionStore-
SapphireClientThe base Client extension that makes Sapphire work. When building a Discord bot with the framework, the developer must either use this class, or extend it.
UserErrorThe UserError class to be emitted in the pieces.
UserPermissionsPreconditionConstructs a contextful permissions precondition requirement.

Interfaces

InterfaceDescription
ArgOptions-
ArgType-
ArgsJson-
ArgsNextCallbackThe value to be mapped.
ArgumentContext-
ArgumentOptions-
AutocompleteCommandContext-
AutocompleteInteractionPayload-
BooleanArgumentContextThe context for the 'boolean' argument.
ChatInputCommandAcceptedPayload-
ChatInputCommandContext-
ChatInputCommandDeniedPayload-
ChatInputCommandErrorPayload-
ChatInputCommandFinishPayload-
ChatInputCommandRunPayload-
ChatInputCommandSuccessPayload-
ClientLoggerOptions-
CommandDoesNotHaveChatInputCommandHandlerPayload-
CommandDoesNotHaveContextMenuCommandHandlerPayload-
CommandDoesNotHaveMessageCommandHandler-
CommandJSON-
CommandOptionsThe Command options.
CommandSpecificRunInA more detailed structure for CommandOptions.runIn when you want to have a different runIn for each command type.
ContextMenuCommandAcceptedPayload-
ContextMenuCommandContext-
ContextMenuCommandDeniedPayload-
ContextMenuCommandErrorPayload-
ContextMenuCommandFinishPayload-
ContextMenuCommandRunPayload-
ContextMenuCommandSuccessPayload-
CooldownOptions-
DetailedDescriptionCommandObject-
EmojiObject-
EnumArgumentContextThe context for the 'enum' argument.
IArgument-
IChatInputCommandPayload-
IContextMenuCommandPayload-
IInteractionHandlerPayload-
ILogger-
IMessageCommandPayload-
IPieceError-
IPreconditionConditionDefines the condition for PreconditionContainerArrays to run.
IPreconditionContainerAn abstracted precondition container to be implemented by classes.
InteractionHandlerError-
InteractionHandlerJSON-
InteractionHandlerOptions-
InteractionHandlerParseError-
InteractionHandlerParseNone-
InteractionHandlerParseSome-
InteractionHandlerParseSuccess-
ListenerErrorPayload-
ListenerJSON-
ListenerOptions-
MemberArgumentContextThe context for the 'member' argument.
MessageCommandAcceptedPayload-
MessageCommandContext-
MessageCommandDeniedPayload-
MessageCommandErrorPayload-
MessageCommandFinishPayload-
MessageCommandRunPayload-
MessageCommandSuccessPayload-
MessageCommandTypingErrorPayload-
MessageResolverOptionsOptions to resolve a message from a string, given a certain context.
PreChatInputCommandRunPayload-
PreContextMenuCommandRunPayload-
PreMessageCommandRunPayload-
PreconditionArrayResolvableDetailsDefines the detailed options for the PreconditionContainerArray, where both the PreconditionRunMode and the entries can be defined.
PreconditionContext-
PreconditionOptions-
PreconditionSingleResolvableDetailsDefines the detailed options for the PreconditionContainerSingle, where both the PreconditionContext and the name of the precondition can be defined.
PreconditionsThe registered preconditions and their contexts, if any. When registering new ones, it is recommended to use module augmentation so custom ones are registered.
RepeatArgOptions-
RunInPreconditionCommandSpecificDataThe specific data for the precondition types for the RunIn precondition, when the command specified the types for specific command types.
SapphireClientOptions-
SapphirePluginAsyncHook-
SapphirePluginHook-
SapphirePluginHookEntry-
SapphirePrefixHook-
SimplePreconditionSingleResolvableDetailsDefines the simple options for the PreconditionContainerSingle, where only the name of the precondition can be defined.
UnknownChatInputCommandPayload-
UnknownContextMenuCommandPayload-
UnknownMessageCommandNamePayload-
UnknownMessageCommandPayload-

Type Aliases

Type aliasDescription
ApplicationCommandRegistryRegisterOptions-
ArgumentResultDefines a synchronous result of an Argument, check Argument.AsyncResult for the asynchronous version.
ArrayResultType-
AsyncArgumentResultDefines an asynchronous result of an Argument, check Argument.Result for the synchronous version.
AsyncPluginHooks-
AsyncPreconditionContainerReturnAsync-only version of PreconditionContainerReturn, to be used when the run method is async.
AsyncPreconditionResult-
AutocompleteCommand-
AwaitableArgumentResultDefines a synchronous or asynchronous result of an Argument, check Argument.AsyncResult for the asynchronous version.
ChatInputCommand-
CommandOptionsRunTypeThe allowed values for CommandOptions.runIn.
CommandRunInUnionThe allowed values for CommandOptions.runIn.
ContextMenuCommand-
DetailedDescriptionCommand-
InteractionHandlerParseResult-
LogMethods-
MessageArgumentContextThe context for the 'message' argument.
MessageCommand-
PreconditionArrayResolvableDefines the data accepted by PreconditionContainerArray's constructor.
PreconditionContainerResultDefines the result's value for a PreconditionContainer.
PreconditionContainerReturnDefines the return type of the generic IPreconditionContainer.messageRun.
PreconditionEntryResolvableDefines the data accepted for each entry of the array.
PreconditionKeys-
PreconditionResult-
PreconditionSingleResolvableDefines the data accepted by PreconditionContainerSingle's constructor.
ResultType-
SapphirePrefixA valid prefix in Sapphire. * string: a single prefix, e.g. '!'. * string[]: an array of prefixes, e.g. ['!', '.']. * null: disabled prefix, locks the bot's command usage to mentions only.
SimplePreconditionKeys-
SyncPluginHooks-

Variables

VariableDescription
ApplicationCommandRegistries-
CorePreconditions-
Events-
InteractionHandlerFilters-
PreconditionConditionAndAn IPreconditionCondition which runs all containers similarly to doing (V0 && V1 [&& V2 [&& V3 ...]]).
PreconditionConditionOrAn IPreconditionCondition which runs all containers similarly to doing (V0
postInitialization-
postLogin-
preGenericsInitialization-
preInitialization-
preLogin-
versionThe @sapphire/framework version that you are currently using. An example use of this is showing it of in a bot information command.