Releases: eritbh/yuuko
v2.3.4
v2.3.3
Changes
- The minimum supported Eris version is now 0.17. Older versions may continue to work for non-Typescript consumers. (#84)
- The exported
ClientEvents
interface has been changed to follow the new format for event typings used by Eris. See also abalabahaha/eris#1242. - Since
Eris.Client
no longer implementsEris.ClientOptions
, Yuuko'sClient
also no longer implements itsClientOptions
. Yuuko'sClientOptions
still extendsEris.ClientOptions
.
- The exported
EventListener#args
is now deprecated. (#84)
v2.3.2
v2.3.1
v2.3.0
Additions
- Subcommands can now be added to commands. (#26, #55, #66)
- Files can now export arrays of commands/event listeners. (#47, #71)
- The default help command now includes some helpers for working with command help values in Typescript. (#72, #74)
Fixes
- The default eval command accepts more code formats and exposes more immediate variables. (#54)
- Global command requirements can now be set from client options. The old method of setting global requirements is deprecated and will be removed in a future major release. (#69, #75)
- Yuuko's peer dependency on Eris is no longer restricted to any specific version. This should help avoid errors when installing a dev branch of Eris.
Meta
v2.2.1
Additions
- Errors thrown from the
addFile
andaddDir
client methods will now include afilename
property that will point to the file that was being processed when the error was thrown. This should aid in troubleshooting invalid exports and other issues when writing modular bots. Recent versions of Node print custom error properties in the console when thrown, so this information should be immediately accessible. (#64, #65)
Fixes
reloadFiles
has been fixes to no longer remove commands/event listeners added from non-file sources. (#62, #63)
Meta
- Documentation generation has been reworked and now uses the standard Typedoc theme rather than a custom Vue app. Documentation for past versions should be kept reliably. (#58, #60)
- Fixed an issue that caused the Github Actions build to report as failing any time a commit to
main
didn't change any source code or generate a difference in build output. (#59) - Updated various aspects of the project ESLint setup for proper linting via CI again. (#61)
v2.2.0
Changes
- The minimum supported Eris version is now 0.15.0. Older versions may continue to work for non-Typescript consumers. (#56)
Fixes
- Type of
CommandRequirements#permissions
no longer includes a lone string. The code for handling this property never handled lone strings correctly, so this isn't a breaking change; always pass an array of permission names rather than a single permission name. (806cd6a)
Meta
- Author's username has changed since last release; links to documentation, donations, etc. have mostly been updated. Please raise an issue or pull request if you encounter any in-repo links that are still pointing to the wrong place. (b02b844)
v2.1.1
Note: This version of Yuuko is still built against [email protected]
, not the latest version. This may cause issues for Typescript users on [email protected]
.
Fixes
- Fixed an issue with
Client#commandForName
not returning the default command when expected, causing the default command system to not work.
v2.1.0
Note: This version of Yuuko is still built against [email protected]
, not the latest version. This may cause issues for Typescript users on [email protected]
.
Additions
-
New
EventListener
class which you can use to encapsulate plain event listeners, similar to theCommand
class. This is designed to let you split your bot's logic across multiple files for more than just commands. You can use a ready listener with{once: true}
to execute whatever code you want exactly once when the bot starts up. These listeners get access to the same context args as commands.const {EventListener} = require('yuuko'); module.exports = new EventListener('messageCreate', (message, context) => { // Process the message, with access to `context.client` and your own context additions }, { once: false // set to true to register this listener with `.once` rather than `.on` - particularly useful with the ready event });
-
To go along with the new event handlers, the methods for registering files and directories with your client have changed -
addCommandFile
is nowaddFile
, andaddCommandDir
is nowaddDir
. The old "command" names are still around as aliases, but are deprecated, and will also load any event listener files you have in the target directories. In a future version, the old names will be removed. You should update existing code to use the new names now.
Deprecations
Client#addCommandFile
andClient#addCommandDir
as noted above - move toClient#addFile
andClient#addDir
respectively.
Fixes
- Bumped some dependencies to fix security issues