Skip to content

Releases: Rodentman87/slashasaurus

0.12.2

30 Sep 17:29
Compare
Choose a tag to compare

wow! much types! so old memes!

(upgrades discord.js to 14.13.0 and narrows some types better, fun!)

TypeScript 5.0!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

16 Mar 17:49
7e03565
Compare
Choose a tag to compare

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!

30 Nov 07:41
857f6a3
Compare
Choose a tag to compare
Pre-release

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

02 Oct 02:27
339f540
Compare
Choose a tag to compare
Pre-release

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

20 Aug 03:43
db72869
Compare
Choose a tag to compare

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!

09 Aug 05:10
db6d620
Compare
Choose a tag to compare
Upgrading to djs v14! Pre-release
Pre-release

Warning
breaking changes ahead, upgrade with caution

This version includes an update from djs v13 to v14 ⚠️ this does mean breaking changes ⚠️. There are no breaking changes related to slashasaurus, only changes to the types that discord.js uses. Check out their migration guide for all the changes you need to be aware of if you're upgrading. Otherwise, if you're starting a new project, everything should be good to go!
https://discordjs.guide/additional-info/changes-in-v14.html

v0.10.4 Minor fixes related to emitted type declaration files

30 Jun 21:01
b0211ea
Compare
Choose a tag to compare

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

30 Jun 04:24
c267956
Compare
Choose a tag to compare

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

03 Jun 03:30
53cb7da
Compare
Choose a tag to compare

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!

17 May 22:32
6dbe74e
Compare
Choose a tag to compare
Pre-release

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.