Pass objects on command.execute

Pass objects instead of using a switch statement.
Now I don't have to restart the bot whenever I add a new command
that needs specific arguments other than 'message'.
This commit is contained in:
SileNce5k 2021-03-09 18:48:46 +01:00
parent 564500869e
commit c51a4fa976
No known key found for this signature in database
GPG key ID: C507260E7F2583AD
11 changed files with 11 additions and 29 deletions

View file

@ -3,7 +3,7 @@ const parseMention = require("../util/parseMention.js")
module.exports = {
name: 'pfp',
description: 'Returns profile picture',
execute(message, args) {
execute({message, args}) {
let info;
if (!args[0]) {
info = message.author.id;