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:
parent
564500869e
commit
c51a4fa976
11 changed files with 11 additions and 29 deletions
|
@ -7,7 +7,7 @@ const creationJoinDates = require("../util/creationJoinDates")
|
|||
module.exports = {
|
||||
name: 'botinfo',
|
||||
description: 'Shows information about the bot',
|
||||
execute(message, client) {
|
||||
execute({message, client}) {
|
||||
let createJoin = creationJoinDates(client.user)
|
||||
const embed = new Discord.MessageEmbed()
|
||||
.setColor(15780145)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue