Shasha/cmds/utility/say.js
2021-05-09 09:50:16 +00:00

26 lines
No EOL
720 B
JavaScript

'use strict';
const commando = require("@iceprod/discord.js-commando");
const { ranLog, trySend, tryDelete } = require("../../resources/functions");
module.exports = class say extends commando.Command {
constructor(client) {
super(client, {
name: "say",
memberName: "say",
group: "utility",
description: "Say."
});
}
run(msg, args) {
let noArgs = `<@!${msg.author.id}> what to say?`;
if (!args) {
args = noArgs;
}
trySend(this.client, msg, args);
if (args !== noArgs && msg.channel.guild) {
tryDelete(msg);
}
return ranLog(msg,'say',`Content: ${args}`);
}
};