Merge remote-tracking branch 'origin/master'

This commit is contained in:
rhearmas 2020-01-07 19:33:51 -05:00
commit d2d867c8fd
3 changed files with 27 additions and 13 deletions

View File

@ -0,0 +1,21 @@
exports.run = async (client, message, args, level) => {
let rateLimit = +args[0] || 0;
message.channel.rateLimitPerUser = rateLimit;
(await message.channel.send(`${message.author} has set ${message.channel}'s slowmode to ${rateLimit} seconds.`)).delete(5000);
};
exports.conf = {
enabled: true,
guildOnly: true,
aliases: ["sm","setslowmode"],
permLevel: "Administrator"
};
exports.help = {
name: "slowmode",
category: "Utility",
description: "Set the slowmode for a channel. If no arguments are provided, this command will disable it.",
emoji: "sparkle",
usage: "slowmode [time:0]"
};

View File

@ -1,5 +1,3 @@
/* make sure these aren't commented
exports.run = async (client, message, args, level) => {
};
@ -18,13 +16,8 @@ exports.help = {
usage: ""
};
*/
/* Basic message auto-deletion
// Basic message auto-deletion
if (!args[0]) {
message.delete();
return (await message.reply("text")).delete(5000);
}
*/
message.delete();
return (await message.reply("text")).delete(5000);
}

View File

@ -38,7 +38,7 @@ const init = async () => {
await crawl("commands",cmdFiles);
client.logger.log(`Loading a total of ${cmdFiles.length} commands.`);
cmdFiles.forEach(f => {
if (!f.endsWith(".js")) return;
if (!f.endsWith(".js") || !f.startsWith("_")) return;
const response = client.loadCommand(f);
if (response) console.log(response);
});
@ -61,4 +61,4 @@ const init = async () => {
client.login(client.config.token);
};
init();
init();