@sapphire/framework
Namespaces
- AliasPiece
- AllFlowsPrecondition
- ApplicationCommandRegistry
- Argument
- ArgumentError
- AutocompleteCommand
- ChatInputCommand
- Command
- ContextMenuCommand
- CorePreconditions
- InteractionHandler
- Listener
- MessageCommand
- Option
- Piece
- Precondition
- PreconditionError
- PreconditionResolvers
- Resolvers
- Result
- Store
- UserError
Enumerations
- BucketScope
- CommandOptionsRunTypeEnum
- CommandPreConditions
- CooldownLevel
- Identifiers
- InteractionHandlerTypes
- InternalRegistryAPIType
- LogLevel
- PluginHook
- PreconditionRunCondition
- PreconditionRunMode
- RegisterBehavior
Classes
- AliasPiece
- AliasStore
- AllFlowsPrecondition
- ApplicationCommandRegistry
- Args
- Argument
- ArgumentError
- ArgumentStore
- ClientPermissionsPrecondition
- Command
- CommandStore
- Err
- InteractionHandler
- InteractionHandlerStore
- Listener
- ListenerLoaderStrategy
- ListenerStore
- LoaderError
- Logger
- MissingExportsError
- None
- Ok
- OptionError
- Piece
- Plugin
- PluginManager
- Precondition
- PreconditionContainerArray
- PreconditionContainerSingle
- PreconditionError
- PreconditionStore
- ResultError
- SapphireClient
- Some
- Store
- StoreRegistry
- UserError
- UserPermissionsPrecondition
Interfaces
- AliasPieceJSON
- AliasPieceOptions
- ArgOptions
- ArgType
- ArgsJson
- ArgsNextCallback
- ArgumentContext
- ArgumentOptions
- AutocompleteCommandContext
- AutocompleteInteractionPayload
- BooleanArgumentContext
- ChatInputCommandAcceptedPayload
- ChatInputCommandContext
- ChatInputCommandDeniedPayload
- ChatInputCommandErrorPayload
- ChatInputCommandFinishPayload
- ChatInputCommandRunPayload
- ChatInputCommandSuccessPayload
- ClientLoggerOptions
- CommandDoesNotHaveChatInputCommandHandlerPayload
- CommandDoesNotHaveContextMenuCommandHandlerPayload
- CommandDoesNotHaveMessageCommandHandler
- CommandJSON
- CommandOptions
- CommandSpecificRunIn
- Container
- ContextMenuCommandAcceptedPayload
- ContextMenuCommandContext
- ContextMenuCommandDeniedPayload
- ContextMenuCommandErrorPayload
- ContextMenuCommandFinishPayload
- ContextMenuCommandRunPayload
- ContextMenuCommandSuccessPayload
- CooldownOptions
- DetailedDescriptionCommandObject
- EmojiObject
- EnumArgumentContext
- IArgument
- IChatInputCommandPayload
- IContextMenuCommandPayload
- IInteractionHandlerPayload
- ILogger
- IMessageCommandPayload
- IOption
- IPieceError
- IPreconditionCondition
- IPreconditionContainer
- IResult
- InteractionHandlerError
- InteractionHandlerJSON
- InteractionHandlerOptions
- InteractionHandlerParseError
- InteractionHandlerParseNone
- InteractionHandlerParseSome
- InteractionHandlerParseSuccess
- ListenerErrorPayload
- ListenerJSON
- ListenerOptions
- LoaderPieceContext
- MemberArgumentContext
- MessageCommandAcceptedPayload
- MessageCommandContext
- MessageCommandDeniedPayload
- MessageCommandErrorPayload
- MessageCommandFinishPayload
- MessageCommandRunPayload
- MessageCommandSuccessPayload
- MessageCommandTypingErrorPayload
- MessageResolverOptions
- PieceContext
- PieceJSON
- PieceLocationJSON
- PieceOptions
- PreChatInputCommandRunPayload
- PreContextMenuCommandRunPayload
- PreMessageCommandRunPayload
- PreconditionArrayResolvableDetails
- PreconditionContext
- PreconditionOptions
- PreconditionSingleResolvableDetails
- Preconditions
- RepeatArgOptions
- RunInPreconditionCommandSpecificData
- SapphireClientOptions
- SapphirePluginAsyncHook
- SapphirePluginHook
- SapphirePluginHookEntry
- SapphirePrefixHook
- SimplePreconditionSingleResolvableDetails
- StoreManagerManuallyRegisteredPiece
- StoreManuallyRegisteredPiece
- StoreOptions
- StoreRegistryEntries
- UnknownChatInputCommandPayload
- UnknownContextMenuCommandPayload
- UnknownMessageCommandNamePayload
- UnknownMessageCommandPayload
Type Aliases
ApplicationCommandRegistryRegisterOptions
Ƭ ApplicationCommandRegistryRegisterOptions: RegisterOptions
Defined in
projects/framework/src/lib/utils/application-commands/ApplicationCommandRegistry.ts:603
ArgumentResult
Ƭ ArgumentResult<T
>: Result
<T
, ArgumentError
<T
>>
Defines a synchronous result of an Argument, check Argument.AsyncResult for the asynchronous version.
Type parameters
Name |
---|
T |
Defined in
projects/framework/src/lib/structures/Argument.ts:12
ArrayResultType
Ƭ ArrayResultType<T
>: Result
<T
[], UserError
| ArgumentError
<T
>>
Type parameters
Name |
---|
T |
Defined in
projects/framework/src/lib/parsers/Args.ts:842
AsyncArgumentResult
Ƭ AsyncArgumentResult<T
>: Promise
<ArgumentResult
<T
>>
Defines an asynchronous result of an Argument, check Argument.Result for the synchronous version.
Type parameters
Name |
---|
T |
Defined in
projects/framework/src/lib/structures/Argument.ts:22
AsyncPluginHooks
Ƭ AsyncPluginHooks: PreLogin
| PostLogin
Defined in
projects/framework/src/lib/plugins/PluginManager.ts:8
AsyncPreconditionContainerReturn
Ƭ AsyncPreconditionContainerReturn: Promise
<PreconditionContainerResult
>
Async-only version of PreconditionContainerReturn, to be used when the run method is async.
Since
1.0.0
Defined in
projects/framework/src/lib/utils/preconditions/IPreconditionContainer.ts:24
AsyncPreconditionResult
Ƭ AsyncPreconditionResult: Promise
<Result
<unknown
, UserError
>>
Defined in
projects/framework/src/lib/structures/Precondition.ts:19
AutocompleteCommand
Ƭ AutocompleteCommand: Command
& Required
<Pick
<Command
, "autocompleteRun"
>>
Defined in
projects/framework/src/lib/types/CommandTypes.ts:255
projects/framework/src/lib/types/CommandTypes.ts:257
Awaitable
Ƭ Awaitable<T
>: PromiseLike
<T
> | T
ReturnType for a function that can return either a value or a Promise
with that value
Type parameters
Name |
---|
T |
Defined in
node_modules/@sapphire/utilities/dist/esm/lib/types.d.mts:44
AwaitableArgumentResult
Ƭ AwaitableArgumentResult<T
>: Awaitable
<ArgumentResult
<T
>>
Defines a synchronous or asynchronous result of an Argument, check Argument.AsyncResult for the asynchronous version.
Type parameters
Name |
---|
T |
Defined in
projects/framework/src/lib/structures/Argument.ts:17
ChatInputCommand
Ƭ ChatInputCommand: Command
& Required
<Pick
<Command
, "chatInputRun"
>>
Defined in
projects/framework/src/lib/types/CommandTypes.ts:295
projects/framework/src/lib/types/CommandTypes.ts:297
CommandOptionsRunType
Ƭ CommandOptionsRunType: "DM"
| "GUILD_TEXT"
| "GUILD_VOICE"
| "GUILD_NEWS"
| "GUILD_NEWS_THREAD"
| "GUILD_PUBLIC_THREAD"
| "GUILD_PRIVATE_THREAD"
| "GUILD_ANY"
The allowed values for CommandOptions.runIn.
Remark
It is discouraged to use this type, we recommend using CommandOptionsRunTypeEnum instead.
Since
2.0.0
Defined in
projects/framework/src/lib/types/CommandTypes.ts:26
CommandRunInUnion
Ƭ CommandRunInUnion: ChannelType
| RunInTypes
| CommandOptionsRunTypeEnum
| readonly (ChannelType
| RunInTypes
| CommandOptionsRunTypeEnum
)[] | Nullish
The allowed values for CommandOptions.runIn.
Since
4.7.0
Defined in
projects/framework/src/lib/types/CommandTypes.ts:40
ContextMenuCommand
Ƭ ContextMenuCommand: Command
& Required
<Pick
<Command
, "contextMenuRun"
>>
Defined in
projects/framework/src/lib/types/CommandTypes.ts:269
projects/framework/src/lib/types/CommandTypes.ts:271
DetailedDescriptionCommand
Ƭ DetailedDescriptionCommand: string
| DetailedDescriptionCommandObject
Defined in
projects/framework/src/lib/types/CommandTypes.ts:17
InteractionHandlerParseResult
Ƭ InteractionHandlerParseResult<Instance
>: UnwrapSome
<Awaited
<ReturnType
<Instance
["parse"
]>>>
Type parameters
Name | Type |
---|---|
Instance | extends InteractionHandler |
Defined in
projects/framework/src/lib/structures/InteractionHandler.ts:100
LogMethods
Ƭ LogMethods: "trace"
| "debug"
| "info"
| "warn"
| "error"
Defined in
projects/framework/src/lib/utils/logger/Logger.ts:54
MessageArgumentContext
Ƭ MessageArgumentContext: Omit
<MessageResolverOptions
, "messageOrInteraction"
> & Context
The context for the 'message'
argument.
Since
4.2.0 (🌿)
Defined in
projects/framework/src/lib/types/ArgumentContexts.ts:53
MessageCommand
Ƭ MessageCommand: Command
& Required
<Pick
<Command
, "messageRun"
>>
Defined in
projects/framework/src/lib/types/CommandTypes.ts:283
projects/framework/src/lib/types/CommandTypes.ts:285
Option
The union of the two variations of Option
.
Typeparam
T The value's type.
Type parameters
Name |
---|
T |
Defined in
node_modules/@sapphire/result/dist/esm/index.d.mts:1819
node_modules/@sapphire/result/dist/esm/index.d.mts:1820
PieceOf
Ƭ PieceOf<StoreName
>: StoreRegistryKey
extends never
? Piece
<Options
, StoreName
> : StoreRegistryEntries
[StoreName
] extends Store
<infer PieceType> ? PieceType
: Piece
<Options
, StoreName
>
Type utility to get the Piece
given its Store
's name.
Since
3.10.0
Type parameters
Name | Type |
---|---|
StoreName | extends StoreRegistryKey |
Defined in
node_modules/@sapphire/pieces/dist/esm/index.d.mts:758
PreconditionArrayResolvable
Ƭ PreconditionArrayResolvable: readonly PreconditionEntryResolvable
[] | PreconditionArrayResolvableDetails
Defines the data accepted by PreconditionContainerArray's constructor.
Since
1.0.0
Defined in
projects/framework/src/lib/utils/preconditions/PreconditionContainerArray.ts:75
PreconditionContainerResult
Ƭ PreconditionContainerResult: Result
<unknown
, UserError
>
Defines the result's value for a PreconditionContainer.
Since
1.0.0
Defined in
projects/framework/src/lib/utils/preconditions/IPreconditionContainer.ts:12
PreconditionContainerReturn
Ƭ PreconditionContainerReturn: Awaitable
<PreconditionContainerResult
>
Defines the return type of the generic IPreconditionContainer.messageRun.
Since
1.0.0
Defined in
projects/framework/src/lib/utils/preconditions/IPreconditionContainer.ts:18
PreconditionEntryResolvable
Ƭ PreconditionEntryResolvable: PreconditionSingleResolvable
| PreconditionArrayResolvable
Defines the data accepted for each entry of the array.
Since
1.0.0
Seealso
Seealso
PreconditionArrayResolvableDetails.entries
Defined in
projects/framework/src/lib/utils/preconditions/PreconditionContainerArray.ts:83
PreconditionKeys
Ƭ PreconditionKeys: keyof Preconditions
Defined in
projects/framework/src/lib/structures/Precondition.ts:158
PreconditionResult
Ƭ PreconditionResult: Awaitable
<Result
<unknown
, UserError
>>
Defined in
projects/framework/src/lib/structures/Precondition.ts:18
PreconditionSingleResolvable
Ƭ PreconditionSingleResolvable: SimplePreconditionKeys
| SimplePreconditionSingleResolvableDetails
| PreconditionSingleResolvableDetails
Defines the data accepted by PreconditionContainerSingle's constructor.
Since
1.0.0
Defined in
projects/framework/src/lib/utils/preconditions/PreconditionContainerSingle.ts:46
Result
Ƭ Result<T
, E
>: Ok
<T
> | Err
<E
>
The union of the two variations of Result
.
Typeparam
T The result's type.
Typeparam
E The error's type.
Type parameters
Name |
---|
T |
E |