- All command executes have been changed to
execute: ({ client, message, args })
- Updated
cooldowns.ts
to work with the new arguments system - Updated
guildCreate.ts
to only look for text channels - Updated
message.ts
to pass in the parameters in the updated variant, as well as theprefab.ts
- Updated
utils.ts
:- Updated
processArguments()
for the new argument system and also added all the needed types totypes.d.ts
- Fixed
paginate()
errors by moving it all into a try-catch statement
- Updated
- Updated
main.ts
: moved connecting to the database before logging in the client - Updated
languages.json
: added missing'No category'
- To improve the cooldown mechanics (e.g. it would set a cooldown even if they didn't use the command properly):
- Added
setCooldown()
andgetCooldown()
setCooldown()
adds a cooldown to a commandgetCooldown()
is a helper method to figure out how long the cooldown for that person is (including the custom server cooldowns)- Also, all cooldowns now are stored in the client object with
client.serverCooldowns
andclient.globalCooldowns
and updated the main file and the typings - Updated the
message event
to work with the new changes - Updated all commands (added a
setCooldown()
) - DISCLAIMER: You have to add the
setCooldown()
method to every command (add it where you want the cooldown to be set, e.g. after all the command usage checks have been made) - Hint: just like in every prefab sided command, just do
import { setCooldown } = from "./path/to/utils/utils.js"; // setCooldown(client, this, message); // the 'this' points at the very own module.exports, so we're passing in the command we're currently using
- Added
- Added