inital init

This commit is contained in:
Phil 2021-09-14 20:03:55 +02:00
commit 6a7cf70640

View file

@ -0,0 +1,19 @@
module.exports.run = async (client, message, args, config) => {
// get subcmd from args
const [subcmd, type, messageID, reason] = args;
if (!messageID || !reason) {
return messageFail(client, message,
`Command usage:
\`\`\`${config.prefix}${module.exports.help.parent} ${subcmd} ${type || 'user'} ${messageID || 'MESSAGEID'} ${reason || 'REASON'}\`\`\``);
}
// get complete reason
let cutLength = 0;
[subcmd, type, messageID].map((arg) => cutLength = cutLength + arg.length + 1);
const slicedReason = await args.join(' ').slice(cutLength);
messageSuccess(message, `\`\`\`${slicedReason}\`\`\``);
};
module.exports.help = {
name: 'CMD_hub_ban_user',
parent: 'hub',
};