All notable changes to this project will be documented in this file. See standard-version for commit guidelines.
2.4.0 (2022-02-05)
- bump dependencies to their latest versions (3b35c91)
- message-parser: do not run commands when the bot has been timed out (#373) (760227d)
2.3.0 (2022-01-08)
2.2.2 (2021-12-26)
- deps: update sapphire dependencies (#342) (b706571)
- fixed module building code on DiscordJS v13.4.0 (#346) (b0d860c)
- make
BooleanArgument
/resolveBoolean
's contexts immutable (#338) (be130fe)
2.2.1 (2021-12-06)
- command: TS Only - Fixed type of re-export of
Command.Context
(422a093) - deps: update sapphire dependencies (#337) (0d06bc0)
2.2.0 (2021-11-21)
- deprecate
ExtendedArgument
(#321) (fd6d095) - expose and use namespaces for options, context, etc (#330) (85e7588)
- preconditions: export all core preconditions (#322) (5a4898f)
2.1.4 (2021-11-06)
- deps: update dependency @sapphire/discord.js-utilities to v4 (#317) (98cafa6)
- docs: replace command usage of
run
tomessageRun
(#310) (6d40eb6) - SapphireClient: include
Ready
generic type from parentClient
(#312) (4d528f5) - update outdated
Args
path in jsdoc (#309) (cd7f1cc)
2.1.3 (2021-10-17)
2.1.2 (2021-10-17)
2.1.1 (2021-10-17)
2.1.0 (2021-10-17)
- allow more npm versions in engines field (ccecf4e)
2.0.0 (2021-10-16)
- 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
.
- 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 CommandOptionsRunTypeEnum (#254) (2d21b03)
- commands: add category getters (#244) (d438ac0)
- cooldown: add
cooldownFilteredUsers
to exempt users from the cooldown precondition (#249) (8261770) - ILogger: add #has method, auto-register Store#logger (#221) (85bfacb)
- member argument: slice off Discord discriminators before performing a query search (#301) (f6261ae)
- NonePrefixedMessage event (#202) (a410bbf)
- resolver: make resolveChannel parse mentions (#253) (506576e)
- resolver: make resolveMessage parse channelId-messageId (#292) (5e915d0)
- specify missing breaking changes (9097cf5)
- stricter types for preconditions (#226) (4a3c76a)
- update @sapphire/pieces to add
ts-node
support (7a1c5c6) - update to DiscordJS v13.2.0 (#295) (51808a5)
- updated for
pieces
v3 (#260) (db6febd)
-
change
Awaited
toAwaitable
(189c01f) -
docs: it was always
info
(3ce4d71) -
explicitly type
version
asstring
(a8c9b39) -
export
CooldownContext
andMessageArgumentContext
(54ba95a) -
fixed ESM bundle (7ca08b2)
-
index: re-export
StoreRegistryEntries
from@sapphire/pieces
(#243) (aa78ba9) -
make from/fromAsync return
unknown
to match TypeScript (#300) (a83f0c9) -
NonePrefixedMessage: rename to NonPrefixedMessage (#205) (ad8adbc)
-
preconditions: fixed UserPermissions precondition (1848f53)
-
preconditions: properly check for
null
in ClientPermissions and UserPermissions (#262) (852ee87) -
remove peer deps, update dev deps, update READMEs (#210) (7cb9e3d)
-
specify missing breaking changes (b9c36de)
-
switch to
sapphire/*[@v2](https://github.com/v2)
anddiscord.js@dev
(#227) (cbf5d4e)
1.0.2 (2021-05-02)
- drop the
www.
from the SapphireJS URL (e9ed4e8) - update all the SapphireJS URLs from
.com
to.dev
(4d0c8ea)
1.0.1 (2021-04-21)
- dependencies: update in semver scope dependencies (ca9a2c1)
- change all Sapphire URLs from "project"->"community" & use our domain where applicable 👨🌾🚜 (#192) (650260e)
1.0.0 (2021-03-16)
1.0.0-alpha.11 (2021-02-16)
- enabled: remove last remnant of essentials (4928823)
1.0.0-alpha.10 (2021-02-12)
- 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.
- 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)
1.0.0-alpha.9 (2021-02-07)
- preconditions: Changed PreconditionContext.command to external
-
events: added UnknownCommandPayload.commandName (#166) (3dbcffd)
-
preconditions: make IPreconditionContainer#run's context optional (#167) (57ad8d2)
1.0.0-alpha.8 (2021-02-07)
- events: Changed
Events.UnknownCommandName
event arguments toUnknownCommandNamePayload
. - events: Changed
Events.UnknownCommand
event arguments toUnknownCommandPayload
.
Co-authored-by: Jeroen Claassens [email protected]
- events: CoreMessageParser is not longer a message event listener
1.0.0-alpha.7 (2021-02-06)
- errors: Changed UserError identifier from
'ArgumentBooleanInvalidBoolean'
toIdentifiers.ArgumentBoolean
. - errors: Changed UserError identifier from
'ArgumentCategoryChannelInvalidChannel'
toIdentifiers.ArgumentCategoryChannel
. - errors: Changed UserError identifier from
'ArgumentChannelMissingChannel'
toIdentifiers.ArgumentChannel
. - errors: Changed UserError identifier from
'ArgumentDateInvalidNumber'
toIdentifiers.ArgumentDate
. - errors: Changed UserError identifier from
'ArgumentDateTooSmall'
toIdentifiers.ArgumentDateTooSmall
. - errors: Changed UserError identifier from
'ArgumentDateTooBig'
toIdentifiers.ArgumentDateTooBig
. - errors: Changed UserError identifier from
'ArgumentDMChannelInvalidChannel'
toIdentifiers.ArgumentDMChannel
. - errors: Changed UserError identifier from
'ArgumentFloatInvalidFloat'
toIdentifiers.ArgumentFloat
. - errors: Changed UserError identifier from
'ArgumentFloatTooSmall'
toIdentifiers.ArgumentFloatTooSmall
. - errors: Changed UserError identifier from
'ArgumentFloatTooBig'
toIdentifiers.ArgumentFloatTooBig
. - errors: Changed UserError identifier from
'ArgumentGuildChannelMissingGuild'
toIdentifiers.ArgumentGuildChannelMissingGuild
. - errors: Changed UserError identifier from
'ArgumentGuildChannelUnknownChannel'
toIdentifiers.ArgumentGuildChannel
. - errors: Changed UserError identifier from
'ArgumentHyperlinkInvalidURL'
toIdentifiers.ArgumentHyperlink
. - errors: Changed UserError identifier from
'ArgumentIntegerInvalidNumber'
toIdentifiers.ArgumentInteger
. - errors: Changed UserError identifier from
'ArgumentIntegerTooSmall'
toIdentifiers.ArgumentIntegerTooSmall
. - errors: Changed UserError identifier from
'ArgumentIntegerTooBig'
toIdentifiers.ArgumentIntegerTooBig
. - errors: Changed UserError identifier from
'ArgumentMemberMissingGuild'
toIdentifiers.ArgumentMemberMissingGuild
. - errors: Changed UserError identifier from
'ArgumentMemberUnknownMember'
toIdentifiers.ArgumentMember
. - errors: Changed UserError identifier from
'ArgumentMessageUnknownMessage'
toIdentifiers.Message
. - errors: Changed UserError identifier from
'ArgumentNewsChannelInvalidChannel'
toIdentifiers.NewsChannel
. - errors: Changed UserError identifier from
'ArgumentNumberInvalidNumber'
toIdentifiers.Number
. - errors: Changed UserError identifier from
'ArgumentNumberTooSmall'
toIdentifiers.ArgumentNumberTooSmall
. - errors: Changed UserError identifier from
'ArgumentNumberTooBig'
toIdentifiers.ArgumentNumberTooBig
. - errors: Changed UserError identifier from
'ArgumentRoleMissingGuild'
toIdentifiers.ArgumentRoleMissingGuild
. - errors: Changed UserError identifier from
'ArgumentRoleUnknownRole'
toIdentifiers.Role
. - errors: Changed UserError identifier from
'ArgumentStringTooShort'
toIdentifiers.ArgumentStringTooShort
. - errors: Changed UserError identifier from
'ArgumentStringTooLong'
toIdentifiers.ArgumentStringTooLong
. - errors: Changed UserError identifier from
'ArgumentTextChannelInvalidChannel'
toIdentifiers.TextChannel
. - errors: Changed UserError identifier from
'ArgumentUserUnknownUser'
toIdentifiers.User
. - errors: Changed UserError identifier from
'ArgumentVoiceChannelInvalidChannel'
toIdentifiers.VoiceChannel
. - errors: Changed UserError identifier from
'CommandDisabled'
toIdentifiers.CommandDisabled
. - errors: Changed UserError identifier from
'UnavailableArgument'
toIdentifiers.ArgsUnavailable
. - errors: Changed UserError identifier from
'MissingArguments'
toIdentifiers.ArgsMissing
. - errors: Changed UserError identifier from
'Cooldown'
toIdentifiers.PreconditionCooldown
. - errors: Changed UserError identifier from
'DMOnly'
toIdentifiers.PreconditionDMOnly
. - errors: Changed UserError identifier from
'GuildOnly'
toIdentifiers.PreconditionGuildOnly
. - errors: Changed UserError identifier from
'NSFW'
toIdentifiers.PreconditionNSFW
. - errors: Changed UserError identifier from
'Permissions'
toIdentifiers.PreconditionPermissions
. - preconditions: Added
PreconditionContext
as third parameter toIPreconditionContainer#run
. - preconditions: Changed
PermissionsPrecondition#context
fromPreconditionContext
toRecord<PropertyKey, unknown>
. - preconditions: Changed
PreconditionContainerSingle#context
fromPreconditionContext
toRecord<PropertyKey, unknown>
. - preconditions: Changed
PreconditionSingleResolvableDetails#context
fromPreconditionContext
toRecord<PropertyKey, unknown>
. - preconditions: Added
PreconditionContext
as third parameter toIPreconditionCondition#run
. - args: changed
Args.err
to returnErr<ArgumentError<T>>
instead ofArgumentError<T>
- args: add Args#ok, refactored Args#error to return Err<ArgumentError> (#159) (65316a6)
- args: change visibility of parser from private to protected (#160) (3ad6f85)
- command: add CommandContext#commandPrefix (#157) (c8c7417)
- command-events: pass more context (#162) (11a6274)
- errors: expose all identifiers in an enum (#161) (3371f35)
- preconditions: add context to Container and Condition (#158) (de6bc03)
1.0.0-alpha.6 (2021-02-04)
1.0.0-alpha.5 (2021-02-02)
- client:
client.arguments
is nowclient.stores.get('arguments')
- client:
client.commands
is nowclient.stores.get('commands')
- client:
client.events
is nowclient.stores.get('events')
- client:
client.preconditions
is nowclient.stores.get('preconditions')
- client:
client.registerUserDirectories
is nowclient.stores.registerUserDirectories
- client:
client.deregisterStore
is nowclient.stores.deregister
- client:
client.registerStore
is nowclient.stores.register
- command parser: The events
prefixedMessage
,unknownCommandName
, andunknownCommand
3rd parameter now have the typestring | RegExp
- command parser:
CommandContext.prefix
now has the typestring | RegExp
- The
UserError
,PreconditionError
,ArgumentError
classes, and theok
,err
functions now take a single parameter which is an object of properties, rather than multiple parameters.
- args: add Args#commandContext (#154) (63c195b)
- client: change stores from a Set to a Map (#129) (01f7161)
- command: add generateDashLessAliases (#146) (e94649c)
- command parser: add regexPrefix client option (#145) (86e6b79)
- preconditions: make Permission errors less vague (#151) (c6b04e1)
- make errors take objects instead of many params (#144) (f638410)
- update discord redirect URL (61edce2)
1.0.0-alpha.4 (2021-01-28)
- argument: pass args through context (#142) (cfeef64)
- arguments: add CoreCategoryChannel (#136) (4c281a3)
- command: expose Command#lexer (#143) (4ec1b4d)
- add optional default error events (#141) (27fd086)
- add discord.js utilities for type guards (cf74431)
1.0.0-alpha.3 (2021-01-14)
- args: add Args#nextMaybe and Args#next (#130) (10a6e0b)
- add client#deregisterStore (#128) (dedd6d1)
- args: add Args#finished (#125) (36e0a1f)
- arguments: more descriptive error messages (#127) (04931bc)
1.0.0-alpha.2 (2021-01-03)
1.0.0-alpha.1 (2020-12-28)
- new preconditions (#119) (10c7a1b)
- arguments: Add Message argument, use discord-utilities (#118) (c70af0a)
- logger: make Logger.levels protected (5a4b8d6)
- re-export public-facing structures from pieces (#113) (648a57d)
- output type declarations to a single .d.ts file (#112) (2652a9b)
- allow case insensitive commands (#105) (a9485ec)
- arguments: add CoreBoolean argument (#96) (c4c25c3)
- arguments: Add extended argument functionality (#101) (8fa9e7b)
- arguments: added more resolvers (#63) (4eb1016)
- arguments: Improve ID/mention checking of members, roles, and users (#100) (008dd44)
- arguments: more helpers, added richer errors (#59) (59027d8)
- commands: add an optional context parameter (#93) (8e1d4f8)
- add event types to event pieces (#27) (770101f)
- add pregenericsinitialization plugin hook (#45) (972c2d4)
- added a lot more features (4051121)
- added cooldown precondition (#76) (cfabf52)
- added events (524f58c)
- added missing imports (7688a0a)
- added permissions precondition and utilities (#64) (123a975)
- added Result, finished PreconditionContainer (08092b1)
- added some minor QoL features, and a lot of docs (#84) (909efb7)
- async login plugin hooks (#46) (95be214)
- implement additional parsing methods for core arguments (#82) (33dc791)
- pass error into Events.CommandDenied (#77) (d329b0f)
- args: add Args#repeat (5924a53)
- args: add overload for IArgument (#39) (0adac4b)
- client: move auto-register to registerUserDirectories (cbb7667)
- client: register and load stores (#31) (db581a9)
- core: add base i18n handlers (#43) (a83b77a)
- core: added logger (#38) (021085c)
- events: add commandSuccess, change commandFinish (#65) (0d107e4)
- flags: Add flag parsing (#47) (905d1fc)
- index: re-export useful exports from @sapphire/pieces (#40) (d89ee44)
- loader: automatically register client's directories (ff86b04)
- commands and command store (#2) (73cdf0e)
- finish command handler (#29) (a890d74)
- implement monitors (#1) (9fde455)
- initial work in precondition runners (bd2be01)
- more events (7f7be02)
- plugin support (#28) (a992b7e)
- type documented events (#25) (df95f00)
- Monitor: add decorators (#7) (5d3accd)
- renamed
Events.SharedReady
->Events.ShardReady
(#107) (d8ca2c0) - args: add boolean to ArgType (#97) (67b4da8)
- events: Return early in CorePreCommandRun if the command is not enabled (#99) (7ac3ba0)
- argument undefined error (#34) (23de1b2)
- do not run disabled commands (#78) (a24175c)
- failing command tests (#24) (ceeb286)
- make tests pass (3068899)
- remove bug breaking prefixless commands (#80) (fc40a6c)
- resolved bug where all pieces were nameless (989e0c7)
- resolved build errors (09bb56f)
- small docs inconsistency (#87) (f560742)
- small typo (#53) (cee4a77)
- typing error (#68) (961c33b)
- args: make options optional (584c6ef)
- arguments: error names (#36) (6b3c195)
- command-handler: handle command name resolution better (0c868e1)
- command-handler: make checks more strict (#62) (77352e8)
- command-handler: pass parameters through all events (44cfe86)
- command-handler: use the right variable (a12e61e)
- core: arguments docs (#44) (1421c05)
- eslint: cast idOffset to a number (923bf43)
- event: set emitter to client if unset (a3bb96e)