discord_bot/commands/say.js
SileNce5k c51a4fa976
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'.
2021-03-09 18:50:27 +01:00

14 lines
No EOL
253 B
JavaScript

module.exports = {
name: 'say',
description: 'Repeats arguments',
execute({message, args}) {
if(args.length == 0)
message.channel.send("Can't send empty message");
else{
message.channel.send(args.join(" "))
message.delete()
}
}
};