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:461


ArgumentResult

Ƭ ArgumentResult<T>: Awaitable<Result<T, UserError>>

Type parameters

Name
T

Defined in

projects/framework/src/lib/structures/Argument.ts:13


AsyncArgumentResult

Ƭ AsyncArgumentResult<T>: Promise<Result<T, UserError>>

Type parameters

Name
T

Defined in

projects/framework/src/lib/structures/Argument.ts:18


AsyncPluginHooks

Ƭ AsyncPluginHooks: PreLogin | PostLogin

Defined in

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


AsyncPreconditionContainerReturn

Ƭ AsyncPreconditionContainerReturn: Promise<PreconditionContainerResult>

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:11


AutocompleteCommand

Ƭ AutocompleteCommand: Command & Required<Pick<Command, "autocompleteRun">>

Defined in

projects/framework/src/lib/structures/Command.ts:513


Awaitable

Ƭ Awaitable<T>: PromiseLike<T> | T

Type parameters

Name
T

Defined in

node_modules/@sapphire/utilities/dist/lib/utilityTypes.d.ts:44


ChatInputCommand

Ƭ ChatInputCommand: Command & Required<Pick<Command, "chatInputRun">>

Defined in

projects/framework/src/lib/structures/Command.ts:489


CommandOptionsRunType

Ƭ CommandOptionsRunType: "DM" | "GUILD_TEXT" | "GUILD_VOICE" | "GUILD_NEWS" | "GUILD_NEWS_THREAD" | "GUILD_PUBLIC_THREAD" | "GUILD_PRIVATE_THREAD" | "GUILD_ANY"

Defined in

projects/framework/src/lib/structures/Command.ts:530


ContextMenuCommand

Ƭ ContextMenuCommand: Command & Required<Pick<Command, "contextMenuRun">>

Defined in

projects/framework/src/lib/structures/Command.ts:501


DetailedDescriptionCommand

Ƭ DetailedDescriptionCommand: string | DetailedDescriptionCommandObject

Defined in

projects/framework/src/lib/structures/Command.ts:828


InteractionHandlerParseResult

Ƭ InteractionHandlerParseResult<Instance>: UnwrapMaybeValue<Awaited<ReturnType<Instance["parse"]>>>

Type parameters

NameType
Instanceextends InteractionHandler

Defined in

projects/framework/src/lib/structures/InteractionHandler.ts:97


LogMethods

Ƭ LogMethods: "trace" | "debug" | "info" | "warn" | "error"

Defined in

projects/framework/src/lib/utils/logger/Logger.ts:54


Maybe

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

Type parameters

NameDescription
T

Defined in

node_modules/@sapphire/result/dist/lib/Maybe.d.ts:6


MessageCommand

Ƭ MessageCommand: Command & Required<Pick<Command, "messageRun">>

Defined in

projects/framework/src/lib/structures/Command.ts:479


Option

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

Type parameters

NameDescription
T

Defined in

node_modules/@sapphire/result/dist/lib/Lexure.d.ts:45


PreconditionArrayResolvable

Ƭ PreconditionArrayResolvable: readonly PreconditionEntryResolvable[] | PreconditionArrayResolvableDetails

Defined in

projects/framework/src/lib/utils/preconditions/PreconditionContainerArray.ts:75


PreconditionContainerResult

Ƭ PreconditionContainerResult: Result<unknown, UserError>

Defined in

projects/framework/src/lib/utils/preconditions/IPreconditionContainer.ts:12


PreconditionContainerReturn

Ƭ PreconditionContainerReturn: Awaitable<PreconditionContainerResult>

Defined in

projects/framework/src/lib/utils/preconditions/IPreconditionContainer.ts:18


PreconditionEntryResolvable

Ƭ PreconditionEntryResolvable: PreconditionSingleResolvable | PreconditionArrayResolvable

Defined in

projects/framework/src/lib/utils/preconditions/PreconditionContainerArray.ts:83


PreconditionKeys

Ƭ PreconditionKeys: keyof Preconditions

Defined in

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


PreconditionResult

Ƭ PreconditionResult: Awaitable<Result<unknown, UserError>>

Defined in

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


PreconditionSingleResolvable

Ƭ PreconditionSingleResolvable: SimplePreconditionKeys | SimplePreconditionSingleResolvableDetails | PreconditionSingleResolvableDetails

Defined in

projects/framework/src/lib/utils/preconditions/PreconditionContainerSingle.ts:43


Result

Ƭ Result<T, E>: Ok<T> | Err<E>

Type parameters

NameDescription
T
E

Defined in

node_modules/@sapphire/result/dist/lib/Result.d.ts:7


SapphirePrefix

Ƭ SapphirePrefix: string | readonly string[] | null

Defined in

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


SimplePreconditionKeys

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

Defined in

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


SyncPluginHooks

Ƭ SyncPluginHooks: Exclude<PluginHook, AsyncPluginHooks>

Defined in

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


UnwrapMaybeValue

Ƭ UnwrapMaybeValue<T>: T extends Some<infer V> ? V : never

Type parameters

NameType
Textends Maybe<unknown>

Defined in

node_modules/@sapphire/result/dist/lib/Maybe.d.ts:64

Variables

ApplicationCommandRegistries

Const ApplicationCommandRegistries: Object

Type declaration

NameType
acquire(commandName: string) => ApplicationCommandRegistry
getDefaultBehaviorWhenNotIdentical() => RegisterBehavior
setDefaultBehaviorWhenNotIdentical(behavior?: null | RegisterBehavior) => void
get registries()ReadonlyMap<string, ApplicationCommandRegistry>

Defined in

projects/framework/src/index.ts:23


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
UserPermissionstypeof CorePrecondition

Defined in

projects/framework/src/index.ts:84


Events

Const Events: Object

Type declaration

NameTypeDescription
ChannelCreate"channelCreate"-
ChannelDelete"channelDelete"-
ChannelPinsUpdate"channelPinsUpdate"-
ChannelUpdate"channelUpdate"-
ChatInputCommandAccepted"chatInputCommandAccepted"
ChatInputCommandDenied"chatInputCommandDenied"
ChatInputCommandError"chatInputCommandError"
ChatInputCommandFinish"chatInputCommandFinish"
ChatInputCommandRun"chatInputCommandRun"
ChatInputCommandSuccess"chatInputCommandSuccess"
ClientReady"ready"-
CommandApplicationCommandRegistryError"commandApplicationCommandRegistryError"
CommandAutocompleteInteractionError"commandAutocompleteInteractionError"
CommandAutocompleteInteractionSuccess"commandAutocompleteInteractionSuccess"
CommandDoesNotHaveChatInputCommandHandler"commandDoesNotHaveChatInputCommandHandler"
CommandDoesNotHaveContextMenuCommandHandler"commandDoesNotHaveContextMenuCommandHandler"
CommandDoesNotHaveMessageCommandHandler"commandDoesNotHaveMessageCommandHandler"
ContextMenuCommandAccepted"contextMenuCommandAccepted"
ContextMenuCommandDenied"contextMenuCommandDenied"
ContextMenuCommandError"contextMenuCommandError"
ContextMenuCommandFinish"contextMenuCommandFinish"
ContextMenuCommandRun"contextMenuCommandRun"
ContextMenuCommandSuccess"contextMenuCommandSuccess"
Debug"debug"-
Error"error"-
GuildBanAdd"guildBanAdd"-
GuildBanRemove"guildBanRemove"-
GuildCreate"guildCreate"-
GuildDelete"guildDelete"-
GuildEmojiCreate"emojiCreate"-
GuildEmojiDelete"emojiDelete"-
GuildEmojiUpdate"emojiUpdate"-
GuildIntegrationsUpdate"guildIntegrationsUpdate"-
GuildMemberAdd"guildMemberAdd"-
GuildMemberAvailable"guildMemberAvailable"-
GuildMemberRemove"guildMemberRemove"-
GuildMemberUpdate"guildMemberUpdate"-
GuildMembersChunk"guildMembersChunk"-
GuildRoleCreate"roleCreate"-
GuildRoleDelete"roleDelete"-
GuildRoleUpdate"roleUpdate"-
GuildStickerCreate"stickerCreate"-
GuildStickerDelete"stickerDelete"-
GuildStickerUpdate"stickerUpdate"-
GuildUnavailable"guildUnavailable"-
GuildUpdate"guildUpdate"-
InteractionCreate"interactionCreate"-
InteractionHandlerError"interactionHandlerError"
InteractionHandlerParseError"interactionHandlerParseError"
InvalidRequestWarning"invalidRequestWarning"-
Invalidated"invalidated"-
InviteCreate"inviteCreate"-
InviteDelete"inviteDelete"-
ListenerError"listenerError"
MentionPrefixOnly"mentionPrefixOnly"
MessageBulkDelete"messageDeleteBulk"-
MessageCommandAccepted"messageCommandAccepted"
MessageCommandDenied"messageCommandDenied"
MessageCommandError"messageCommandError"
MessageCommandFinish"messageCommandFinish"
MessageCommandRun"messageCommandRun"
MessageCommandSuccess"messageCommandSuccess"
MessageCommandTypingError"messageCommandTypingError"
MessageCreate"messageCreate"-
MessageDelete"messageDelete"-
MessageReactionAdd"messageReactionAdd"-
MessageReactionRemove"messageReactionRemove"-
MessageReactionRemoveAll"messageReactionRemoveAll"-
MessageReactionRemoveEmoji"messageReactionRemoveEmoji"-
MessageUpdate"messageUpdate"-
NonPrefixedMessage"nonPrefixedMessage"
PiecePostLoad"piecePostLoad"
PieceUnload"pieceUnload"
PluginLoaded"pluginLoaded"
PossibleAutocompleteInteraction"possibleAutocompleteInteraction"
PossibleChatInputCommand"possibleChatInputCommand"
PossibleContextMenuCommand"possibleContextMenuCommand"
PreChatInputCommandRun"preChatInputCommandRun"
PreContextMenuCommandRun"preContextMenuCommandRun"
PreMessageCommandRun"preMessageCommandRun"
PreMessageParsed"preMessageParsed"
PrefixedMessage"prefixedMessage"
PresenceUpdate"presenceUpdate"-
RateLimit"rateLimit"-
Raw"raw"-
ShardDisconnect"shardDisconnect"-
ShardError"shardError"-
ShardReady"shardReady"-
ShardReconnecting"shardReconnecting"-
ShardResume"shardResume"-
StageInstanceCreate"stageInstanceCreate"-
StageInstanceDelete"stageInstanceDelete"-
StageInstanceUpdate"stageInstanceUpdate"-
ThreadCreate"threadCreate"-
ThreadDelete"threadDelete"-
ThreadListSync"threadListSync"-
ThreadMemberUpdate"threadMemberUpdate"-
ThreadMembersUpdate"threadMembersUpdate"-
ThreadUpdate"threadUpdate"-
TypingStart"typingStart"-
UnknownChatInputCommand"unknownChatInputCommand"
UnknownContextMenuCommand"unknownContextMenuCommand"
UnknownMessageCommand"unknownMessageCommand"
UnknownMessageCommandName"unknownMessageCommandName"
UserUpdate"userUpdate"-
VoiceServerUpdate"voiceServerUpdate"-
VoiceStateUpdate"voiceStateUpdate"-
Warn"warn"-
WebhooksUpdate"webhookUpdate"-

Defined in

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


InteractionHandlerFilters

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

Defined in

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


PreconditionConditionAnd

Const PreconditionConditionAnd: IPreconditionCondition

Defined in

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


PreconditionConditionOr

Const PreconditionConditionOr: IPreconditionCondition

Defined in

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


container

Const container: Container

Defined in

node_modules/@sapphire/pieces/dist/index.d.ts:642


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]{version}[/VI]'

Defined in

projects/framework/src/index.ts:113

Functions

err

err(): Err<unknown>

Returns

Err<unknown>

Defined in

node_modules/@sapphire/result/dist/lib/Result.d.ts:24

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

Type parameters

NameDescription
E

Parameters

NameTypeDescription
xE

Returns

Err<E>

Defined in

node_modules/@sapphire/result/dist/lib/Result.d.ts:31


from

from<T, E>(cb): Result<T, E>

Type parameters

NameTypeDescription
TT
Eunknown

Parameters

NameType
cb(...args: unknown[]) => T

Returns

Result<T, E>

Defined in

node_modules/@sapphire/result/dist/lib/Parsers.d.ts:7


fromAsync

fromAsync<T, E>(promiseOrCb): Promise<Result<T, E>>

Type parameters

NameTypeDescription
TT
Eunknown

Parameters

NameType
promiseOrCbAwaitable<T> | (...args: unknown[]) => Awaitable<T>

Returns

Promise<Result<T, E>>

Defined in

node_modules/@sapphire/result/dist/lib/Parsers.d.ts:13


isErr

isErr<T, E>(x): x is Err<E>

Type parameters

NameDescription
T
E

Parameters

NameType
xResult<T, E>

Returns

x is Err<E>

Defined in

node_modules/@sapphire/result/dist/lib/Result.d.ts:43


isMaybe

isMaybe<T>(x): true

Type parameters

Name
T

Parameters

NameTypeDescription
xMaybe<T>

Returns

true

Defined in

node_modules/@sapphire/result/dist/lib/Maybe.d.ts:58

isMaybe<T>(x): x is Maybe<T>

Type parameters

Name
T

Parameters

NameTypeDescription
xunknown

Returns

x is Maybe<T>

Defined in

node_modules/@sapphire/result/dist/lib/Maybe.d.ts:63


isNone

isNone<T>(x): x is None

Type parameters

NameDescription
T

Parameters

NameType
xMaybe<T>

Returns

x is None

Defined in

node_modules/@sapphire/result/dist/lib/Maybe.d.ts:53


isOk

isOk<T, E>(x): x is Ok<T>

Type parameters

NameDescription
T
E

Parameters

NameType
xResult<T, E>

Returns

x is Ok<T>

Defined in

node_modules/@sapphire/result/dist/lib/Result.d.ts:37


isSome

isSome<T>(x): x is Some<T>

Type parameters

NameDescription
T

Parameters

NameType
xMaybe<T>

Returns

x is Some<T>

Defined in

node_modules/@sapphire/result/dist/lib/Maybe.d.ts:48


maybe

maybe<T, V>(value): V

Type parameters

NameType
TT
Vextends Maybe<T>

Parameters

NameTypeDescription
valueV

Returns

V

Defined in

node_modules/@sapphire/result/dist/lib/Maybe.d.ts:11

maybe(value): None

Parameters

NameTypeDescription
valuenull | None

Returns

None

Defined in

node_modules/@sapphire/result/dist/lib/Maybe.d.ts:16

maybe<T>(value): Maybe<T>

Type parameters

Name
T

Parameters

NameTypeDescription
valuenull | T | Maybe<T>

Returns

Maybe<T>

Defined in

node_modules/@sapphire/result/dist/lib/Maybe.d.ts:21

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

Type parameters

Name
T

Parameters

NameTypeDescription
valueT | Some<T>

Returns

Some<T>

Defined in

node_modules/@sapphire/result/dist/lib/Maybe.d.ts:26


none

none(): None

Returns

None

Defined in

node_modules/@sapphire/result/dist/lib/Maybe.d.ts:43


ok

ok(): Ok<unknown>

Returns

Ok<unknown>

Defined in

node_modules/@sapphire/result/dist/lib/Result.d.ts:12

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

Type parameters

NameDescription
T

Parameters

NameTypeDescription
xT

Returns

Ok<T>

Defined in

node_modules/@sapphire/result/dist/lib/Result.d.ts:19


some

some(): Some<unknown>

Returns

Some<unknown>

Defined in

node_modules/@sapphire/result/dist/lib/Maybe.d.ts:31

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

Type parameters

NameDescription
T

Parameters

NameTypeDescription
xT

Returns

Some<T>

Defined in

node_modules/@sapphire/result/dist/lib/Maybe.d.ts:38