Releases: sapphiredev/framework
Releases · sapphiredev/framework
v2.1.1
v2.1.0
v2.0.0
What's Changed
2.0.0 (2021-10-16)
⚠ BREAKING CHANGES
- For TypeScript users only, if you were previously using
from
orfromAsync
and you expected the error result to be of typeError
, it will now beunknown
. You can reset this back toError
by providing it as the second generic type argument. - command: For TypeScript users please rename your
Command#run
methods toCommand#messageRun
Awaited
type has been renamed toAwaitable
- Updated
@sapphire/pieces
to3.0.0
- Removed
Command#categories
, useCommandStore#categories
instead - arguments: Changed the error message of DateArgument
- arguments: Changed the error message of FloatArgument
- arguments: Changed the error message of NumberArgument
- arguments: Changed the error message of IntegerArgument
- arguments: Changed the error message of all arguments that must be run in a guild
- arguments: Changed the error message of GuildNewsThreadChannelArgument
- arguments: Changed the error message of GuildPrivateThreadChannelArgument
- arguments: Changed the error message of GuildPublicThreadChannelArgument
- arguments: Changed the error message of GuildStageVoiceChannelArgument
- arguments: Changed the error message of GuildTextChannelArgument
- arguments: Changed the error message of GuildThreadChannelArgument
- arguments: Changed the error message of GuildVoiceChannelArgument
- arguments: Changed the error message of GuildMemberArgument
- arguments: Changed the error message of UserArgument
- arguments: Made MessageArgumentContext private
- arguments: Stop exposing the channel property in context of the ChannelArgument error
- arguments: Stop exposing the channel property in context of the GuildCategoryChannelArgument error
- arguments: Stop exposing the channel property in context of the GuildNewsChannelArgument error
- arguments: Stop exposing the channel property in context of the GuildPrivateThreadArgument error
- arguments: Stop exposing the channel property in context of the GuildStageVoiceChannelArgument error
- arguments: Stop exposing the channel property in context of the GuildTextChannelArgument error
- arguments: Stop exposing the channel property in context of the GuildThreadChannelArgument error
- arguments: Stop exposing the channel property in context of the GuildVoiceChannelArgument error
- arguments: Rename Identifiers.ArgumentBoolean to Identifiers.ArgumentBooleanError
- arguments: Rename Identifiers.ArgumentCategoryChannel to Identifiers.ArgumentGuildCategoryChannelError
- arguments: Rename Identifiers.ArgumentChannel to Identifiers.ArgumentChannelError
- arguments: Rename Identifiers.ArgumentDate to Identifiers.ArgumentDateError
- arguments: Rename Identifiers.ArgumentDateTooSmall to Identifiers.ArgumentDateTooEarly
- arguments: Rename Identifiers.ArgumentDateTooBig to Identifiers.ArgumentDateTooFar
- arguments: Rename Identifiers.ArgumentDMChannel to Identifiers.ArgumentDMChannelError
- arguments: Rename Identifiers.ArgumentFloat to Identifiers.ArgumentFloatError
- arguments: Rename Identifiers.ArgumentFloatTooBig to Identifiers.ArgumentFloatTooLarge
- arguments: Rename Identifiers.ArgumentGuildChannel to Identifiers.ArgumentGuildChannelError
- arguments: Rename Identifiers.ArgumentGuildChannelMissingGuild to Identifiers.ArgumentGuildChannelMissingGuildError
- arguments: Rename Identifiers.ArgumentHyperlink to Identifiers.ArgumentHyperlinkError
- arguments: Rename Identifiers.ArgumentInteger to Identifiers.ArgumentIntegerError
- arguments: Rename Identifiers.ArgumentIntegerTooBig to Identifiers.ArgumentIntegerTooLarge
- arguments: Rename Identifiers.ArgumentMember to Identifiers.ArgumentMemberError
- arguments: Rename Identifiers.ArgumentMessage to Identifiers.ArgumentMessageError
- arguments: Rename Identifiers.ArgumentNewsChannel to Identifiers.ArgumentGuildNewsChannelError
- arguments: Rename Identifiers.ArgumentNumber to Identifiers.ArgumentNumberError
- arguments: Rename Identifiers.ArgumentNumberTooBig to Identifiers.ArgumentNumberTooLarge
- arguments: Rename Identifiers.ArgumentRole to Identifiers.ArgumentRoleError
- arguments: Rename Identifiers.ArgumentTextChannel to Identifiers.ArgumentGuildTextChannel
- arguments: Rename Identifiers.ArgumentUser to Identifiers.ArgumentUserError
- arguments: Rename Identifiers.ArgumentVoiceChannel to Identifiers.ArgumentGuildVoiceChannel
Identifiers.PreconditionPermissions
has been renamed toIdentifiers.PreconditionClientPermissions
- UserError identifier
preconditionPermissions
has been renamed topreconditionClientPermissions
Permissions
precondition has been renamed toClientPermissions
PermissionsPrecondition
class has been renamed toClientPermissionsPrecondition
- listener: Listeners will now be automatically unloaded if no emitter is found
- Changed
guildChannel
argument to returnGuildChannel | ThreadChannel
. - Changed
SapphireClient.id
's type toSnowflake | null
. - Changed
SapphireClientOptions.id
's type toSnowflake | null
. - Removed
Events.GuildMemberSpeaking
. - Removed
StoreRegistry
, it is now re-exported from@sapphire/pieces
. - Renamed
ArgType.categoryChannel
toguildCategoryChannel
. - Renamed
ArgType.newsChannel
toguildNewsChannel
. - Renamed
ArgType.textChannel
toguildTextChannel
. - Renamed
ArgType.voiceChannel
toguildVoiceChannel
. - Renamed
CommandPreConditions.NewsOnly
toGuildNewsOnly
. - Renamed
CommandPreConditions.TextOnly
toGuildTextOnly
. - Renamed
Identifiers.PreconditionNewsOnly
toPreconditionGuildNewsOnly
. - Renamed
Identifiers.PreconditionTextOnly
toPreconditionGuildTextOnly
. - Renamed
Preconditions.NewsOnly
toGuildNewsOnly
. - Renamed
Preconditions.TextOnly
toGuildTextOnly
. - Renamed the possible values for
CommandOptionsRunType
. - Updated
CooldownContext.delay
to not be optional. - Updated
discord.js
requirement to v13. - Changed
Command#preconditions
toPreconditionContainerArray
. - Removed
Command#resolveConstructorPreConditions
. - Renamed
CommandOptions.cooldownBucket
tocooldownLimit
. - Renamed
CommandOptions.cooldownDuration
tocooldownDelay
. - Renamed
BucketType
toBucketScope
. - Changed
PreconditionSingleResolvableDetails
to take a type parameter. - Changed
PreconditionSingleResolvable
to usePreconditions
's type. - Renamed
CooldownContext.bucketType
toscope
. - Renamed
Event
toListener
- Renamed
EventStore
toListenerStore
- Changed events directory from
events
tolisteners
- Renamed
SapphireClientOptions.loadDefaultErrorEvents
toloadDefaultErrorListeners
- Renamed
StoreRegistryEntries.events
toStoreRegistryEntries.listeners
- Refactored
Events
enum to be an object, so we can use discord.js's constants - Renamed
Events.EventError
toEvents.ListenerError
- Renamed
EventErrorPayload
toListenerErrorPayload
- Renamed
Events.Ready
toEvents.ClientReady
- Renamed
Events.Message
toEvents.MessageCreate
- Flattened
CommandOptions.strategyOptions
intoCommandOptions
- Changed
CommandOptions.preconditions
to always require an array - Updated
@sapphire/pieces
to 2.0.0 - Renamed
PieceContextExtras
toContainer
, usage and augmentation is the same. - Removed
Store.injectedContext
, use globally exportedcontainer
variable instead. - Renamed
Store#context
toStore#container
. - Renamed
Piece#context
toPiece#container
.
Features
- add
Result#from
andResult#fromAsync
(#267) (300f2ed) - Add
typing
property to fireTextChannel.sendTyping()
when a command is accepted (#258) (71c1883) - add managed role mention prefix support (#289) (7846d6c)
- add partial dm channel argument (#288) (c8c74de)
- add UserPermissions precondition (#252) (2bb2e12)
- added auto-preconditions (#199) (7e79e15)
- arguments: extract logic to resolvers (#237) (32d591b)
- client: added option to set a default cooldown for all commands (#294) (7734d59)
- command: add
command#messageRun
method and deprecation warning forcommand#run
(#299) (750c25c) - command: add Command...
v1.0.2
v1.0.1
v1.0.0
v1.0.0-alpha.11
v1.0.0-alpha.10
1.0.0-alpha.10 (2021-02-12)
⚠ BREAKING CHANGES
- command-accepted:
Events.CommandRun
third argument changed type toCommandRunPayload
,
this is mostly identical toCommandAcceptedPayload
(and exactly identical toCommandFinishPayload
)
and likely won't be a breaking change for your code, however you may need to adjust
your import when using TypeScript. - command-accepted:
Events.CommandFinish
third argument changed type toCommandFinishPayload
,
this is mostly identical toCommandAcceptedPayload
(and exactly identical toCommandRunPayload
)
and likely won't be a breaking change for your code, however you may need to adjust
your import when using TypeScript.
Features
- args: add
name
to context ofArgs.unavailableArgument
(#171) (a5bda61) - args: add more data to error context for core arguments (0cfff79)
- args: pass more context to args errors (#174) (007eaed)
- argumenterror: add type default of
unknown
(55be30a) - command-accepted: add received args to event payloads (#173) (fa60b13)
- message-parser: add
caseInsensitivePrefixes
client option (#170) (61f9c41)
v1.0.0-alpha.9
v1.0.0-alpha.8
1.0.0-alpha.8 (2021-02-07)
⚠ BREAKING CHANGES
- events: Changed
Events.UnknownCommandName
event arguments toUnknownCommandNamePayload
. - events: Changed
Events.UnknownCommand
event arguments toUnknownCommandPayload
. - events: CoreMessageParser is not longer a message event listener