Releases: Rodentman87/slashasaurus
0.12.2
TypeScript 5.0!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
0.12.1 is out!!!!!!!!!!!!! TypeScript 5.0!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
New update requires the latest version of TypeScript (5.0.2) or greater. BUT, that means... NO MORE as const
ANYWHERE!!!!!!!!!!!!!!!!!!!!!! Go delete them all!!!!!!!!!!!!!!!
v0.12.0 Discord.js v14.7!
This latest release upgrades to Discord,js version 14.7 and includes all the new features that come along with that, including Forums, and the new Select menu types! This release also fixes a type issue when setting channelTypes on a channel option for slash commands. The new select menus all have variants for Pages as well!
v0.11.2 A quick fix for PageLinkButtons
This is a small patch fix to fix an issue with the PageLinkButtons not properly being serialized and throwing an error
v0.11.1 Fixes for autocomplete and page sends
Due to an oversight when making the autocomplete handler, autocomplete functions weren't actually called for subcommands. This has been corrected and autocomplete in subcommands should work fine now!
Additionally, the two page send functions (sendToChannel
and sendAsReply
) now return promises that you can await, this will allow you to ensure pages are sent before running later code.
Upgrading to djs v14!
Warning
breaking changes ahead, upgrade with caution
This version includes an update from djs v13 to v14
https://discordjs.guide/additional-info/changes-in-v14.html
v0.10.4 Minor fixes related to emitted type declaration files
This version is a minor change that fixes an issue where command loading would attempt to load .d.ts
files when loading commands from a directory.
v0.10.3 A new option to skip validation and transformation of parameters during autocomplete
This version adds a new option when creating your client to skip validation and transformation of options when running autocomplete handlers, this is useful if you have a very resource-intensive transformer that doesn't need to be run for autocomplete to happen.
v0.10.0 Perms v2 and other breaking changes
Warning
This version does contain multiple breaking changes
With this release, command registration has moved to using @discordjs/builders and @discordjs/rest. This means that there has been some changes, the first of which is that you can now set defaultMemberPermissions and dmPermissions on commands. Another change is that there was a slight change in which enum type you should use for restricting channel types on an option. (Use the one from discord-api-types
if you're a TS user (either one will technically work, but if you use the from from discord-api-types then TS will stop complaining)) The last of the breaking changes is that with this new system you now need to pass your token to the command registration function.
With this release there's also now guild commands! This is a basic version that lets you register a second folder of commands just for a specific guild, this can be useful for something like developer only commands that you may want to only register in your dev server. This does currently come with a small restriction though, guild commands cannot share a name with any global commands. This restriction will be removed once this upstream issue is resolved so that slashasaurus can tell when something is a guild command.
v0.9.0 Custom validators!
This release adds the ability to specify a custom validator
for any option. When the command is run by a user, each option will first be passed to the validator
for that option if one exists, then it will be passed to the transformer
if one exists and the value was valid, then it's added to the options object. If there are any validation errors for the command, the run function wont be called and instead the user will receive an ephemeral reply listing all the validation errors. To specify a validator function for an option, just pass a function that will take the CommandInteration and the value and either return true for valid values or return a string containing the error message for invalid values. Instead of returning a string you can also throw
a ValidationError and the error message will be used.
This release also cleans up the types quite a bit for all the options and makes types more specific for channel options when you pass a list of channelTypes
.