Skip to main content

@sapphire/framework

Namespaces

Enumerations

Classes

Interfaces

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

NameType
Instanceextends 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

Ƭ Option<T>: Some<T> | None

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

NameType
StoreNameextends 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

PreconditionArrayResolvable

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

Defined in

node_modules/@sapphire/result/dist/esm/index.d.mts:901

node_modules/@sapphire/result/dist/esm/index.d.mts:902


ResultType

Ƭ ResultType<T>: Result<T, UserError | ArgumentError<T>>

Type parameters

Name
T

Defined in

projects/framework/src/lib/parsers/Args.ts:841


SapphirePrefix

Ƭ SapphirePrefix: string | readonly string[] | null

A 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.

Defined in

projects/framework/src/lib/SapphireClient.ts:33


SimplePreconditionKeys

Ƭ SimplePreconditionKeys: { [K in PreconditionKeys]: Preconditions[K] extends never ? K : never }[PreconditionKeys]

Defined in

projects/framework/src/lib/structures/Precondition.ts:159


StoreOf

Ƭ StoreOf<StoreName>: StoreRegistryKey extends never ? Store<Piece<Options, StoreName>> : StoreRegistryEntries[StoreName]

Type utility to get the Store given its name.

Since

3.10.0

Type parameters

NameType
StoreNameextends StoreRegistryKey

Defined in

node_modules/@sapphire/pieces/dist/esm/index.d.mts:753


StoreRegistryKey

Ƭ StoreRegistryKey: keyof StoreRegistryEntries

A type utility to get the keys of StoreRegistryEntries.

Since

3.10.0

Defined in

node_modules/@sapphire/pieces/dist/esm/index.d.mts:729


StoreRegistryValue

Ƭ StoreRegistryValue: StoreRegistryEntries[StoreRegistryKey]

A type utility to get the values of StoreRegistryEntries.

Since

3.10.0

Defined in

node_modules/@sapphire/pieces/dist/esm/index.d.mts:734


SyncPluginHooks

Ƭ SyncPluginHooks: Exclude<PluginHook, AsyncPluginHooks>

Defined in

projects/framework/src/lib/plugins/PluginManager.ts:13

Variables

ApplicationCommandRegistries

Const ApplicationCommandRegistries: Object

Type declaration

NameType
acquire(commandName: string) => ApplicationCommandRegistry
getDefaultBehaviorWhenNotIdentical() => RegisterBehavior
getDefaultGuildIds() => undefined | string[]
setDefaultBehaviorWhenNotIdentical(behavior?: null | RegisterBehavior) => void
setDefaultGuildIds(guildIds?: null | string[]) => void
get registries()ReadonlyMap<string, ApplicationCommandRegistry>

Defined in

projects/framework/src/index.ts:26


CorePreconditions

Const CorePreconditions: Object

Type declaration

NameType
ClientPermissionstypeof CorePrecondition
Cooldowntypeof CorePrecondition
DMOnlytypeof CorePrecondition
Enabledtypeof CorePrecondition
GuildNewsOnlytypeof CorePrecondition
GuildNewsThreadOnlytypeof CorePrecondition
GuildOnlytypeof CorePrecondition
GuildPrivateThreadOnlytypeof CorePrecondition
GuildPublicThreadOnlytypeof CorePrecondition
GuildTextOnlytypeof CorePrecondition
GuildThreadOnlytypeof CorePrecondition
GuildVoiceOnlytypeof CorePrecondition
NSFWtypeof CorePrecondition
RunIntypeof CorePrecondition
UserPermissionstypeof CorePrecondition

Defined in

projects/framework/src/index.ts:110

projects/framework/src/index.ts:138


Events

Const Events: Object

Type declaration

NameTypeDescription
ApplicationCommandPermissionsUpdateApplicationCommandPermissionsUpdate-
ApplicationCommandRegistriesBulkOverwriteError"applicationCommandRegistriesBulkOverwriteError"Emitted when an error is encountered when handling the command registries in bulk overwrite mode. Param The error that was thrown Param The guild id where the error was thrown
ApplicationCommandRegistriesInitialising"applicationCommandRegistriesInitialising"Emitted when the application command registries are being initialized.
ApplicationCommandRegistriesRegistered"applicationCommandRegistriesRegistered"Emitted once the application command registries have been initialized. Param The initialised registries
AutoModerationActionExecutionAutoModerationActionExecution-
AutoModerationRuleCreateAutoModerationRuleCreate-
AutoModerationRuleDeleteAutoModerationRuleDelete-
AutoModerationRuleUpdateAutoModerationRuleUpdate-
CacheSweepCacheSweep-
ChannelCreateChannelCreate-
ChannelDeleteChannelDelete-
ChannelPinsUpdateChannelPinsUpdate-
ChannelUpdateChannelUpdate-
ChatInputCommandAccepted"chatInputCommandAccepted"Emitted when a chat input command passes all precondition checks, if any. Param The contextual payload
ChatInputCommandDenied"chatInputCommandDenied"Emitted when a precondition denies a chat input command from being run. Param The error reported by the precondition Param The contextual payload
ChatInputCommandError"chatInputCommandError"Emitted after a chat input command runs unsuccesfully. Param The error that was thrown Param The contextual payload
ChatInputCommandFinish"chatInputCommandFinish"Emitted directly after a chat input command finished running, regardless of the outcome. Param The interaction that executed the command Param The command that finished running Param The contextual payload
ChatInputCommandRun"chatInputCommandRun"Emitted directly before a chat input command is run. Param The interaction that executed the command Param The command that is being run Param The contextual payload
ChatInputCommandSuccess"chatInputCommandSuccess"Emitted after a chat input command runs successfully. Param The contextual payload
ClientReadyClientReady-
CommandApplicationCommandRegistryError"commandApplicationCommandRegistryError"Emitted when an error is encountered when handling the command application command registry. Param The error that was thrown Param The command whose registry caused the error
CommandAutocompleteInteractionError"commandAutocompleteInteractionError"Emitted when an error is encountered when executing an autocomplete interaction handler. Param The error that was encountered Param The contextual payload
CommandAutocompleteInteractionSuccess"commandAutocompleteInteractionSuccess"Emitted after an autocomplete interaction handler runs successfully. Param The contextual payload
CommandDoesNotHaveChatInputCommandHandler"commandDoesNotHaveChatInputCommandHandler"Emitted when a chat input command is executed but a chatInputRun method is not found. Param The contextual payload
CommandDoesNotHaveContextMenuCommandHandler"commandDoesNotHaveContextMenuCommandHandler"Emitted when a chat input command is executed but a contextMenuRun method is not found. Param The contextual payload
CommandDoesNotHaveMessageCommandHandler"commandDoesNotHaveMessageCommandHandler"Emitted when a message command is executed but a messageRun method is not found. Param The contextual payload
ContextMenuCommandAccepted"contextMenuCommandAccepted"Emitted when a context menu command passes all precondition checks, if any. Param The contextual payload
ContextMenuCommandDenied"contextMenuCommandDenied"Emitted when a precondition denies a context menu command from being run. Param The error reported by the precondition Param The contextual payload
ContextMenuCommandError"contextMenuCommandError"Emitted after a context menu command runs unsuccesfully. Param The error that was thrown Param The contextual payload
ContextMenuCommandFinish"contextMenuCommandFinish"Emitted directly after a context menu command finished running, regardless of the outcome. Param The interaction that executed the command Param The command that finished running Param The contextual payload
ContextMenuCommandRun"contextMenuCommandRun"Emitted directly before a context menu command is run. Param The interaction that executed the command Param The command that is being run Param The contextual payload
ContextMenuCommandSuccess"contextMenuCommandSuccess"Emitted after a context menu command runs successfully. Param The contextual payload
DebugDebug-
ErrorError-
GuildAuditLogEntryCreateGuildAuditLogEntryCreate-
GuildAvailableGuildAvailable-
GuildBanAddGuildBanAdd-
GuildBanRemoveGuildBanRemove-
GuildCreateGuildCreate-
GuildDeleteGuildDelete-
GuildEmojiCreateGuildEmojiCreate-
GuildEmojiDeleteGuildEmojiDelete-
GuildEmojiUpdateGuildEmojiUpdate-
GuildIntegrationsUpdateGuildIntegrationsUpdate-
GuildMemberAddGuildMemberAdd-
GuildMemberAvailableGuildMemberAvailable-
GuildMemberRemoveGuildMemberRemove-
GuildMemberUpdateGuildMemberUpdate-
GuildMembersChunkGuildMembersChunk-
GuildRoleCreateGuildRoleCreate-
GuildRoleDeleteGuildRoleDelete-
GuildRoleUpdateGuildRoleUpdate-
GuildScheduledEventCreateGuildScheduledEventCreate-
GuildScheduledEventDeleteGuildScheduledEventDelete-
GuildScheduledEventUpdateGuildScheduledEventUpdate-
GuildScheduledEventUserAddGuildScheduledEventUserAdd-
GuildScheduledEventUserRemoveGuildScheduledEventUserRemove-
GuildStickerCreateGuildStickerCreate-
GuildStickerDeleteGuildStickerDelete-
GuildStickerUpdateGuildStickerUpdate-
GuildUnavailableGuildUnavailable-
GuildUpdateGuildUpdate-
InteractionCreateInteractionCreate-
InteractionHandlerError"interactionHandlerError"Emitted when an error is encountered when executing an interaction handler. Param The error that was encountered Param The contextual payload
InteractionHandlerParseError"interactionHandlerParseError"Emitted when the parse method of an interaction handler encounters an error. Param The error that was encountered Param The contextual payload
InteractionHandlerParseNone"interactionHandlerParseNone"Emitted when the parse method of an interaction handler passes successfully (no errors are encountered) and none is returned. Param The Option.None from the parse method. Param The contextual payload
InteractionHandlerParseSome"interactionHandlerParseSome"Emitted when the parse method of an interaction handler passes successfully (no errors are encountered) and some is returned. Param The Option.Some from the parse method. Param The contextual payload
InteractionHandlerParseSuccess"interactionHandlerParseSuccess"Emitted when the parse method of an interaction handler passes successfully (no errors are encountered) Use the option parameter to determine if some or none was passed. Param The Option from the parse method. Param The contextual payload
InvalidatedInvalidated-
InviteCreateInviteCreate-
InviteDeleteInviteDelete-
ListenerError"listenerError"Emitted when an error is encountered when executing a listener. Param The error that was thrown Param The contextual payload
MentionPrefixOnly"mentionPrefixOnly"Emitted when a message is created consisting of only the bot's mention. Param The created message
MessageBulkDeleteMessageBulkDelete-
MessageCommandAccepted"messageCommandAccepted"Emitted when a message command passes all precondition checks, if any. Param The contextual payload
MessageCommandDenied"messageCommandDenied"Emitted when a precondition denies a message command from being run. Param The error reported by the precondition Param The contextual payload
MessageCommandError"messageCommandError"Emitted after a message command runs unsuccesfully. Param The error that was thrown Param The contextual payload
MessageCommandFinish"messageCommandFinish"Emitted directly after a message command finished running, regardless of the outcome. Param The message that executed the command Param The command that finished running Param The contextual payload
MessageCommandRun"messageCommandRun"Emitted directly before a message command is run. Param The message that executed the command Param The command that is being run Param The contextual payload
MessageCommandSuccess"messageCommandSuccess"Emitted after a message command runs successfully. Param The contextual payload
MessageCommandTypingError"messageCommandTypingError"Emitted after the bot unsuccessfully tried to start typing when a command is executed. Param The error that was thrown Param The contextual payload
MessageCreateMessageCreate-
MessageDeleteMessageDelete-
MessageReactionAddMessageReactionAdd-
MessageReactionRemoveMessageReactionRemove-
MessageReactionRemoveAllMessageReactionRemoveAll-
MessageReactionRemoveEmojiMessageReactionRemoveEmoji-
MessageUpdateMessageUpdate-
NonPrefixedMessage"nonPrefixedMessage"Emitted when a message is created that does not start with a valid prefix. Param The created message
PiecePostLoad"piecePostLoad"Emitted after a piece is loaded. Param The store in which the piece belongs to Param The piece that was loaded
PieceUnload"pieceUnload"Emitted when a piece is unloaded. Param The store in which the piece belongs to Param The piece that was unloaded
PluginLoaded"pluginLoaded"Emitted when a plugin is loaded. Param The plugin hook that was loaded Param The name of the plugin, if any
PossibleAutocompleteInteraction"possibleAutocompleteInteraction"Emitted when an autocomplete interaction is recieved. Param The interaction that was recieved
PossibleChatInputCommand"possibleChatInputCommand"Emitted when a chat input command interaction is recieved. Param The interaction that was recieved.
PossibleContextMenuCommand"possibleContextMenuCommand"Emitted when a context menu interaction is recieved. Param The interaction that was recieved.
PreChatInputCommandRun"preChatInputCommandRun"Emitted before the chatInputRun method of a command is run. Param The contextual payload
PreContextMenuCommandRun"preContextMenuCommandRun"Emitted before the contextMenuRun method of a command is run. Param The contextual payload
PreMessageCommandRun"preMessageCommandRun"Emitted before the messageRun method of a command is run. Param The contextual payload
PreMessageParsed"preMessageParsed"Emitted when a message is created that was not sent by bots or webhooks. Param The created message
PrefixedMessage"prefixedMessage"Emitted when a message is created that does starts with a valid prefix. Param The created message
PresenceUpdatePresenceUpdate-
RawRaw-
ShardDisconnectShardDisconnect-
ShardErrorShardError-
ShardReadyShardReady-
ShardReconnectingShardReconnecting-
ShardResumeShardResume-
StageInstanceCreateStageInstanceCreate-
StageInstanceDeleteStageInstanceDelete-
StageInstanceUpdateStageInstanceUpdate-
ThreadCreateThreadCreate-
ThreadDeleteThreadDelete-
ThreadListSyncThreadListSync-
ThreadMemberUpdateThreadMemberUpdate-
ThreadMembersUpdateThreadMembersUpdate-
ThreadUpdateThreadUpdate-
TypingStartTypingStart-
UnknownChatInputCommand"unknownChatInputCommand"Emitted when the name of a sent chat input command does not match any loaded commands. Param The contextual payload
UnknownContextMenuCommand"unknownContextMenuCommand"Emitted when the name of a sent context menu command does not match any loaded commands. Param The contextual payload
UnknownMessageCommand"unknownMessageCommand"Emitted when the name of a sent message command does not match any loaded commands. Param The contextual payload
UnknownMessageCommandName"unknownMessageCommandName"Emitted when a message starts with a valid prefix but does not include a command name. Param
UserUpdateUserUpdate-
VoiceServerUpdateVoiceServerUpdate-
VoiceStateUpdateVoiceStateUpdate-
WarnWarn-
WebhooksUpdateWebhooksUpdate-

Defined in

projects/framework/src/lib/types/Events.ts:27


InteractionHandlerFilters

Const InteractionHandlerFilters: Map<InteractionHandlerTypes, (interaction: Interaction) => boolean>

Defined in

projects/framework/src/lib/structures/InteractionHandlerStore.ts:87


PreconditionConditionAnd

Const PreconditionConditionAnd: IPreconditionCondition

An IPreconditionCondition which runs all containers similarly to doing (V0 && V1 [&& V2 [&& V3 ...]]).

Since

1.0.0

Defined in

projects/framework/src/lib/utils/preconditions/conditions/PreconditionConditionAnd.ts:8


PreconditionConditionOr

Const PreconditionConditionOr: IPreconditionCondition

An IPreconditionCondition which runs all containers similarly to doing (V0 || V1 [|| V2 [|| V3 ...]]).

Since

1.0.0

Defined in

projects/framework/src/lib/utils/preconditions/conditions/PreconditionConditionOr.ts:9


container

Const container: Container

The injected variables that will be accessible to any place. To add an extra property, simply add a property with a regular assignment, and it will be available in all places simultaneously.

Example

// Add a reference for the version:
import { container } from '@sapphire/pieces';

container.version = '1.0.0';

// Can be placed anywhere in a TypeScript file, for JavaScript projects,
// you can create an `augments.d.ts` and place the code there.
declare module '@sapphire/pieces' {
interface Container {
version: string;
}
}

// In any piece, core, plugin, or custom:
export class UserCommand extends Command {
public run(message, args) {
// The injected version is available here:
const { version } = this.container;

// ...
}
}

Example

// In a plugin's context, e.g. API:
class Api extends Plugin {
static [postInitialization]() {
const server = new Server(this);
container.server = server;

// ...
}
}

declare module '@sapphire/pieces' {
interface Container {
server: Server;
}
}

// In any piece, even those that aren't routes nor middlewares:
export class UserRoute extends Route {
public [methods.POST](message, args) {
// The injected server is available here:
const { server } = this.container;

// ...
}
}

Defined in

node_modules/@sapphire/pieces/dist/esm/index.d.mts:834


none

Const none: None

Defined in

node_modules/@sapphire/result/dist/esm/index.d.mts:1809


postInitialization

Const postInitialization: unique symbol

Defined in

projects/framework/src/lib/plugins/symbols.ts:3


postLogin

Const postLogin: unique symbol

Defined in

projects/framework/src/lib/plugins/symbols.ts:6


preGenericsInitialization

Const preGenericsInitialization: unique symbol

Defined in

projects/framework/src/lib/plugins/symbols.ts:1


preInitialization

Const preInitialization: unique symbol

Defined in

projects/framework/src/lib/plugins/symbols.ts:2


preLogin

Const preLogin: unique symbol

Defined in

projects/framework/src/lib/plugins/symbols.ts:5


version

Const version: string = '[VI]{{inject}}[/VI]'

The @sapphire/framework version that you are currently using. An example use of this is showing it of in a bot information command.

Note to Sapphire developers: This needs to explicitly be string so it is not typed as the string that gets replaced by esbuild

Defined in

projects/framework/src/index.ts:150

Functions

err

err(): Err<unknown>

Creates an Err with no error.

Returns

Err<unknown>

An erroneous Result.

Defined in

node_modules/@sapphire/result/dist/esm/index.d.mts:1755

err<E>(x): Err<E>

Creates an Err.

Type parameters

Name
E

Parameters

NameTypeDescription
xEValue to use.

Returns

Err<E>

An erroneous Result.

Typeparam

E The error's type.

Defined in

node_modules/@sapphire/result/dist/esm/index.d.mts:1762


ok

ok(): Ok<unknown>

Creates an Ok with no value.

Returns

Ok<unknown>

A successful Result.

Defined in

node_modules/@sapphire/result/dist/esm/index.d.mts:881

ok<T>(x): Ok<T>

Creates an Ok.

Type parameters

Name
T

Parameters

NameTypeDescription
xTValue to use.

Returns

Ok<T>

A successful Result.

Typeparam

T The result's type.

Defined in

node_modules/@sapphire/result/dist/esm/index.d.mts:888


some

some<T>(value): Some<T>

Type parameters

Name
T

Parameters

NameType
valueT

Returns

Some<T>

Defined in

node_modules/@sapphire/result/dist/esm/index.d.mts:1702