categorize cmds in file struct

master
Kit Kasune 4 years ago
parent 9b1255ccbd
commit dd4e8196be
  1. 8
      commands/anime/anime.js
  2. 2
      commands/dev/admin.js
  3. 4
      commands/dev/blacklist.js
  4. 2
      commands/dev/developer.js
  5. 4
      commands/dev/eval.js
  6. 2
      commands/dev/pull.js
  7. 2
      commands/dev/reload.js
  8. 6
      commands/dev/setstatus.js
  9. 2
      commands/dev/staff.js
  10. 2
      commands/dev/support.js
  11. 2
      commands/dev/vip.js
  12. 0
      commands/fun/8ball.js
  13. 8
      commands/fun/deathnote.js
  14. 6
      commands/fun/kiss.js
  15. 6
      commands/fun/secretsanta.js
  16. 8
      commands/fun/slap.js
  17. 4
      commands/leveling/levelchannel.js
  18. 6
      commands/leveling/levelrole.js
  19. 2
      commands/leveling/setupleveling.js
  20. 2
      commands/leveling/stats.js
  21. 6
      commands/misc/ar.js
  22. 4
      commands/misc/avatar.js
  23. 6
      commands/misc/help.js
  24. 2
      commands/misc/info.js
  25. 4
      commands/misc/ingorear.js
  26. 0
      commands/misc/invite.js
  27. 4
      commands/misc/prefix.js
  28. 0
      commands/misc/supportserver.js
  29. 2
      commands/misc/userinfo.js
  30. 2
      commands/moderation/autorole.js
  31. 6
      commands/moderation/ban.js
  32. 2
      commands/moderation/clearwarnings.js
  33. 6
      commands/moderation/kick.js
  34. 6
      commands/moderation/leave.js
  35. 4
      commands/moderation/logs.js
  36. 12
      commands/moderation/response.js
  37. 4
      commands/moderation/softban.js
  38. 4
      commands/moderation/staffrole.js
  39. 2
      commands/moderation/togglestatuses.js
  40. 0
      commands/moderation/unban.js
  41. 6
      commands/moderation/warn.js
  42. 6
      commands/moderation/welcome.js
  43. 4
      commands/social/afk.js
  44. 2
      commands/social/bio.js
  45. 4
      commands/social/clearstatus.js
  46. 6
      commands/social/cry.js
  47. 4
      commands/social/dnd.js
  48. 8
      commands/social/hug.js
  49. 6
      commands/social/sip.js
  50. 4
      commands/social/starboard.js
  51. 0
      commands/utility/randnum.js
  52. 7
      handle/command.js
  53. 2
      handle/event.js
  54. 2
      handle/response.js
  55. 2
      util/cache.js

@ -1,9 +1,9 @@
const {TagFilter} = require("../util/tagfilter");
const {Tag} = require ("../util/tag");
const {TagFilter} = require("../../util/tagfilter");
const {Tag} = require ("../../util/tag");
const Discord = require('discord.js');
const UserData = require('../models/user');
const AniData = require('../models/anime');
const UserData = require('../../models/user');
const AniData = require('../../models/anime');
module.exports = {
name: "anime",

@ -1,5 +1,5 @@
const Discord = require('discord.js');
const UserData = require('../models/user');
const UserData = require('../../models/user');
module.exports = {
name: "admin",

@ -1,6 +1,6 @@
const Discord = require('discord.js');
const UserData = require('../models/user');
const GuildData = require('../models/guild')
const UserData = require('../../models/user');
const GuildData = require('../../models/guild')
module.exports = {
name: "blacklist",

@ -1,6 +1,6 @@
const Discord = require('discord.js');
const mongoose = require('mongoose');
const UserData = require('../models/user');
const UserData = require('../../models/user');
module.exports = {
name: "developer",

@ -1,8 +1,8 @@
const Discord = require('discord.js');
const chalk = require('chalk');
const {Tag} = require('../util/tag');
const {TagFilter} = require('../util/tagfilter');
const {Tag} = require('../../util/tag');
const {TagFilter} = require('../../util/tagfilter');
module.exports = {
name: 'eval',

@ -1,7 +1,7 @@
const Discord = require('discord.js');
const fs = require('fs');
const chalk = require('chalk');
const UserData = require('../models/user');
const UserData = require('../../models/user');
const cp = require('child_process');
module.exports = {

@ -3,7 +3,7 @@ const fs = require('fs');
const chalk = require('chalk');
const ora = require('ora');
const UserData = require("../models/user");
const UserData = require("../../models/user");
module.exports = {
name: "reload",

@ -1,9 +1,9 @@
const Discord = require('discord.js');
const UserData = require('../models/user');
const UserData = require('../../models/user');
const {TagFilter} = require('../util/tagfilter');
const {Tag} = require('../util/tag');
const {TagFilter} = require('../../util/tagfilter');
const {Tag} = require('../../util/tag');
module.exports = {
name: "setstatus",

@ -1,5 +1,5 @@
const Discord = require('discord.js');
const UserData = require('../models/user');
const UserData = require('../../models/user');
module.exports = {
name: "staff",

@ -1,5 +1,5 @@
const Discord = require('discord.js');
const UserData = require('../models/user');
const UserData = require('../../models/user');
module.exports = {
name: "support",

@ -18,7 +18,7 @@ module.exports = {
if (!message.guild) {return message.reply("This command is server-only!");}
if (!args.length) {return message.channel.send(`Syntax: \`${prefix}vip <add|remove|check>\``);}
if (!client.developers.includes(message.author.id) && !['check', 'c', 'view', 'v'].includes(args[0])) {return message.reply("Unfortunately, this is a **developer-only command**!");}
const GuildSettings = require('../models/guild');
const GuildSettings = require('../../models/guild');
const logemb = (act) => new Discord.MessageEmbed()
.setAuthor(`VIP Server ${act}`, message.author.avatarURL())
.setDescription("A Server's VIP status was updated.")

@ -1,10 +1,10 @@
const Discord = require('discord.js');
const moment = require('moment');
const VC = require('../models/vscount');
const VC = require('../../models/vscount');
const {Tag} = require('../util/tag');
const {TagFilter} = require('../util/tagfilter');
const {Tag} = require('../../util/tag');
const {TagFilter} = require('../../util/tagfilter');
const deaths = [
"watching too much anime", "an overdose of waifus", "Hypotakunemia", "trying to self-isekai",
@ -111,7 +111,7 @@ module.exports = {
.setTimestamp()
);
await require('../util/wait')(2500);
await require('../../util/wait')(2500);
let text = reptype.texts[Math.floor(Math.random() * reptype.texts.length)]
.replace(/{p}/g, victim) //{p} = victim

@ -1,7 +1,7 @@
const Discord = require('discord.js');
const Saves = require('../models/saves');
const UserData = require('../models/user');
const makeId = require('../util/makeid');
const Saves = require('../../models/saves');
const UserData = require('../../models/user');
const makeId = require('../../util/makeid');
module.exports = {
name: "kiss",

@ -1,7 +1,7 @@
const Discord = require('discord.js');
const SS = require('../models/secretsanta');
const SS = require('../../models/secretsanta');
const ask = require('../util/ask');
const ask = require('../../util/ask');
module.exports = {
name: "secretsanta",
@ -55,7 +55,7 @@ module.exports = {
let id;
while (true) {
id = require('../util/makeid')(6);
id = require('../../util/makeid')(6);
let test = await SS.findOne({ssid: id});
if (!test) {break;}
}

@ -1,10 +1,10 @@
const Discord = require('discord.js');
const Saves = require('../models/saves');
const UserData = require('../models/user');
const VC = require('../models/vscount');
const Saves = require('../../models/saves');
const UserData = require('../../models/user');
const VC = require('../../models/vscount');
const makeId = require('../util/makeid');
const makeId = require('../../util/makeid');
module.exports = {
name: "slap",

@ -1,7 +1,7 @@
const Discord = require('discord.js');
const UserData = require('../models/user');
const LXP = require('../models/localxp');
const UserData = require('../../models/user');
const LXP = require('../../models/localxp');
module.exports = {
name: "levelchannel",

@ -1,9 +1,9 @@
const Discord = require('discord.js');
const GuildData = require('../models/guild');
const LR = require('../models/levelroles');
const GuildData = require('../../models/guild');
const LR = require('../../models/levelroles');
const ask = require('../util/ask');
const ask = require('../../util/ask');
module.exports = {
name: "levelrole",

@ -1,6 +1,6 @@
const Discord = require('discord.js');
const LXP = require('../models/localxp');
const LXP = require('../../models/localxp');
module.exports = {
name: "setupleveling",

@ -1,6 +1,6 @@
const Discord = require('discord.js');
const LXP = require('../models/localxp');
const LXP = require('../../models/localxp');
module.exports = {
name: "stats",

@ -1,9 +1,9 @@
const Discord = require('discord.js');
const AR = require('../models/ar');
const GuildData = require('../models/guild');
const AR = require('../../models/ar');
const GuildData = require('../../models/guild');
const ask = require('../util/ask');
const ask = require('../../util/ask');
module.exports = {
name: "ar",

@ -1,6 +1,6 @@
const Discord = require('discord.js');
const {Tag} = require('../util/tag');
const {TagFilter} = require('../util/tagfilter');
const {Tag} = require('../../util/tag');
const {TagFilter} = require('../../util/tagfilter');
module.exports = {
name: "avatar",

@ -1,7 +1,7 @@
const Discord = require("discord.js");
const {Pagination} = require('../util/pagination');
const ask = require('../util/ask');
const {Pagination} = require('../../util/pagination');
const ask = require('../../util/ask');
module.exports = {
name: "help",
@ -50,7 +50,7 @@ module.exports = {
if (['l', 'leveling', 'level'].includes(`${cat}`.trim().toLowerCase())) {pages = helpSorted['Leveling'];}
if (['a', 'all'].includes(`${cat}`.trim().toLowerCase())) {pages = []; let c; for (c of Object.values(helpSorted)) {let h; for (h of c) {pages.push(h)}}}
await require('../util/wait')(500);
await require('../../util/wait')(500);
if (pages.length > 1) {
let help = new Pagination(message.channel, pages, message, client, true);

@ -12,7 +12,7 @@ module.exports = {
extra: null
},
async execute(message, msg, args, cmd, prefix, mention, client) {
let botData = await require('../models/bot').findOne({finder: 'lel'});
let botData = await require('../../models/bot').findOne({finder: 'lel'});
return message.channel.send(new Discord.MessageEmbed()
.setAuthor("About Me!", client.users.cache.get(client.developers[Math.floor(Math.random() * client.developers.length)]).avatarURL())

@ -1,7 +1,7 @@
const Discord = require('discord.js');
const AR = require('../models/ar');
const GuildData = require('../models/guild');
const AR = require('../../models/ar');
const GuildData = require('../../models/guild');
module.exports = {
name: "ignorear",

@ -1,6 +1,6 @@
const Discord = require('discord.js');
const mongoose = require('mongoose');
const GuildSettings = require('../models/guild');
const GuildSettings = require('../../models/guild');
module.exports = {
name: "prefix",
@ -34,7 +34,7 @@ module.exports = {
}
client.guildconfig.prefixes.set(message.guild.id, np);
let upm = await message.reply("sure thing!");
await require('../util/wait')(1750);
await require('../../util/wait')(1750);
return upm.edit(new Discord.MessageEmbed()
.setAuthor('Prefix updated!', message.author.avatarURL())
.setDescription(`New prefix: \`${np}\``)

@ -1,7 +1,7 @@
const Discord = require('discord.js');
const moment = require('moment');
const mongoose = require('mongoose');
const UserData = require('../models/user');
const UserData = require('../../models/user');
module.exports = {
name: "userinfo",

@ -1,5 +1,5 @@
const Discord = require('discord.js');
const GuildData = require('../models/guild');
const GuildData = require('../../models/guild');
module.exports = {
name: "autorole",

@ -1,9 +1,9 @@
const Discord = require('discord.js');
const Mod = require('../models/mod');
const Mod = require('../../models/mod');
const {Tag} = require('../util/tag');
const {TagFilter} = require('../util/tagfilter');
const {Tag} = require('../../util/tag');
const {TagFilter} = require('../../util/tagfilter');
module.exports = {
name: "ban",

@ -1,6 +1,6 @@
const Discord = require('discord.js');
const Mod = require('../models/mod');
const Mod = require('../../models/mod');
module.exports = {
name: "clearwarnings",

@ -1,9 +1,9 @@
const Discord = require('discord.js');
const Mod = require('../models/mod');
const Mod = require('../../models/mod');
const {Tag} = require('../util/tag');
const {TagFilter} = require('../util/tagfilter');
const {Tag} = require('../../util/tag');
const {TagFilter} = require('../../util/tagfilter');
module.exports = {
name: "kick",

@ -1,7 +1,7 @@
const Discord = require('discord.js');
const GuildData = require('../models/guild');
const Responses = require('../models/responses');
const sendResponse = require('../util/response/sendresponse');
const GuildData = require('../../models/guild');
const Responses = require('../../models/responses');
const sendResponse = require('../../util/response/sendresponse');
module.exports = {
name: "leave",

@ -1,7 +1,7 @@
const Discord = require("discord.js");
const GuildData = require('../models/guild');
const LogData = require('../models/log');
const GuildData = require('../../models/guild');
const LogData = require('../../models/log');
const ObjLogTypes = {

@ -1,12 +1,12 @@
const Discord = require('discord.js');
const GuildData = require('../models/guild');
const Responses = require('../models/responses');
const GuildData = require('../../models/guild');
const Responses = require('../../models/responses');
const sendResponse = require('../util/response/sendresponse');
const parseResponse = require('../util/response/parseresponse');
const saveResponse = require('../util/response/saveresponse');
const getResponse = require('../util/response/getresponse');
const sendResponse = require('../../util/response/sendresponse');
const parseResponse = require('../../util/response/parseresponse');
const saveResponse = require('../../util/response/saveresponse');
const getResponse = require('../../util/response/getresponse');
module.exports = {
name: "response",

@ -1,7 +1,7 @@
const Discord = require('discord.js');
const {Tag} = require("../util/tag");
const {TagFilter} = require("../util/tagfilter");
const {Tag} = require("../../util/tag");
const {TagFilter} = require("../../util/tagfilter");
module.exports = {
name: "softban",

@ -1,6 +1,6 @@
const Discord = require('discord.js');
const mongoose = require('mongoose');
const GuildSettings = require('../models/guild');
const GuildSettings = require('../../models/guild');
module.exports = {
name: "staffrole",
@ -40,7 +40,7 @@ module.exports = {
tguild.staffrole = role.id;
tguild.save();
let upm = await message.reply("sure thing!");
await require('../util/wait')(1750);
await require('../../util/wait')(1750);
return upm.edit(new Discord.MessageEmbed()
.setAuthor('Staff role updated!', message.author.avatarURL())
.setDescription(`<@&${tguild.staffrole}> can now edit my settings in this server.`)

@ -1,5 +1,5 @@
const Discord = require('discord.js');
const GuildSettings = require('../models/guild');
const GuildSettings = require('../../models/guild');
module.exports = {
name: "togglestatuses",

@ -1,9 +1,9 @@
const Discord = require('discord.js');
const Mod = require('../models/mod');
const Mod = require('../../models/mod');
const {TagFilter} = require('../util/tagfilter');
const {Tag} = require('../util/tag');
const {TagFilter} = require('../../util/tagfilter');
const {Tag} = require('../../util/tag');
module.exports = {
name: "warn",

@ -1,7 +1,7 @@
const Discord = require('discord.js');
const GuildData = require('../models/guild');
const Responses = require('../models/responses');
const sendResponse = require('../util/response/sendresponse');
const GuildData = require('../../models/guild');
const Responses = require('../../models/responses');
const sendResponse = require('../../util/response/sendresponse');
module.exports = {
name: "welcome",

@ -1,6 +1,6 @@
const Discord = require('discord.js');
const mongoose = require('mongoose');
const UserData = require('../models/user');
const UserData = require('../../models/user');
module.exports = {
name: "afk",
@ -34,7 +34,7 @@ module.exports = {
let tempDate = new Date();
tu.statusclearat = tempDate.setHours(tempDate.getHours() + 12);
tu.save();
require('../util/cachestatus')(message.author.id, tempDate.setHours(tempDate.getHours() + 12));
require('../../util/cachestatus')(message.author.id, tempDate.setHours(tempDate.getHours() + 12));
return message.reply(`I set your ${tu.statusclearmode === 'auto' ? 'automatically' : 'manually'}-clearing AFK message to: ${reason.trim()}`);
}
};

@ -1,5 +1,5 @@
const Discord = require('discord.js');
const UserData = require('../models/user');
const UserData = require('../../models/user');
module.exports = {
name: "bio",

@ -1,7 +1,7 @@
const Discord = require('discord.js');
const mongooes = require('mongoose');
const UserData = require('../models/user');
const UserData = require('../../models/user');
module.exports = {
name: "clearstatus",
@ -20,7 +20,7 @@ module.exports = {
tu.statusmsg = '';
tu.statustype = '';
tu.save();
require('../util/siftstatuses')(client, message.author.id, true);
require('../../util/siftstatuses')(client, message.author.id, true);
return message.reply("welcome back! I cleared your status.").then(m => {m.delete({timeout: 5000}).then(() => {if (message.guild && message.guild.me.permissions.has("DELETE_MESSAGES")) {message.delete().catch(() => {});}})});
}
};

@ -1,7 +1,7 @@
const Discord = require('discord.js');
const Saves = require('../models/saves');
const UserData = require('../models/user');
const makeId = require('../util/makeid');
const Saves = require('../../models/saves');
const UserData = require('../../models/user');
const makeId = require('../../util/makeid');
module.exports = {
name: "cry",

@ -1,6 +1,6 @@
const Discord = require('discord.js');
const mongoose = require('mongoose');
const UserData = require('../models/user');
const UserData = require('../../models/user');
module.exports = {
name: "dnd",
@ -34,7 +34,7 @@ module.exports = {
let tempDate = new Date();
tu.statusclearat = tempDate.setHours(tempDate.getHours() + 12);
tu.save();
require('../util/cachestatus')(message.author.id, tempDate.setHours(tempDate.getHours() + 12));
require('../../util/cachestatus')(message.author.id, tempDate.setHours(tempDate.getHours() + 12));
return message.reply(`I set your ${tu.statusclearmode === 'auto' ? 'automatically' : 'manually'}-clearing Do not Disturb message to: ${reason.trim()}`);
}
};

@ -1,10 +1,10 @@
const Discord = require('discord.js');
const Saves = require('../models/saves');
const UserData = require('../models/user');
const VC = require('../models/vscount');
const Saves = require('../../models/saves');
const UserData = require('../../models/user');
const VC = require('../../models/vscount');
const makeId = require('../util/makeid');
const makeId = require('../../util/makeid');
module.exports = {
name: "hug",

@ -1,7 +1,7 @@
const Discord = require('discord.js');
const Saves = require('../models/saves');
const UserData = require('../models/user');
const makeId = require('../util/makeid');
const Saves = require('../../models/saves');
const UserData = require('../../models/user');
const makeId = require('../../util/makeid');
module.exports = {
name: "sip",

@ -1,6 +1,6 @@
const Discord = require('discord.js');
const GuildData = require('../models/guild');
const ask = require('../util/ask');
const GuildData = require('../../models/guild');
const ask = require('../../util/ask');
module.exports = {
name: "starboard",

@ -4,7 +4,8 @@ const chalk = require('chalk');
//const ora = require('ora');
module.exports = client => {
var commands = fs.readdirSync('./commands').filter(file => file.endsWith('.js'));
let commands = fs.readdirSync('./commands').filter(file => file.endsWith('.js'));
fs.readdirSync('./commands').filter(file => !file.includes('.')).forEach(dir => fs.readdirSync(`./commands/${dir}`).filter(file => file.endsWith('.js')).forEach(x => commands.push(x)));
//console.log('');
//let cora = ora(`${chalk.white("Loading commands into client.")} ${chalk.blue("[")}${chalk.blueBright("0")}${chalk.blue("/")}${chalk.blueBright(`${commands.length}`)}${chalk.blue("]")}`).start();
@ -17,12 +18,12 @@ module.exports = client => {
var command = require(`../commands/${commandf}`);
client.commands.set(command.name, command);
if (command.aliases) {command.aliases.forEach(a => client.aliases.set(a, command.name));}
console.log(`${chalk.gray('[LOG] ')} >> ${chalk.blueBright('Loaded Command')} ${chalk.white(command.name)} ${chalk.blueBright('with')} ${chalk.white(command.aliases && command.aliases.length ? command.aliases.length : 0)} ${chalk.blueBright('aliases')}`);
console.log(`${chalk.gray('[LOAD]')} >> ${chalk.blueBright('Loaded Command')} ${chalk.white(command.name)} ${chalk.blueBright('with')} ${chalk.white(command.aliases && command.aliases.length ? command.aliases.length : 0)} ${chalk.blueBright('aliases')}`);
}
/*cora.stop(); cora.clear();
console.log(`${chalk.gray('[BOOT]')} >> ${chalk.blue('Getting Commands...')}\n`);
Array.from(client.commands.values()).forEach(command => {
console.log(`${chalk.gray('[LOG] ')} >> ${chalk.blueBright('Loaded Command')} ${chalk.white(command.name)} ${chalk.blueBright('with')} ${chalk.white(command.aliases && command.aliases.length ? command.aliases.length : 0)} ${chalk.blueBright('aliases')}`);
console.log(`${chalk.gray('[LOAD]')} >> ${chalk.blueBright('Loaded Command')} ${chalk.white(command.name)} ${chalk.blueBright('with')} ${chalk.white(command.aliases && command.aliases.length ? command.aliases.length : 0)} ${chalk.blueBright('aliases')}`);
});*/
console.log(`\n${chalk.gray('[BOOT]')} >> ${chalk.blue('Loaded all Commands')}`);
};

@ -11,7 +11,7 @@ module.exports = client => {
let evt = require('../events/' + file);
client.removeAllListeners(evtName);
client.on(evtName, evt.bind(null, client));
console.log(`${chalk.gray('[LOG] ')} >> ${chalk.blueBright('Loaded Event')} ${chalk.white(evtName)}`);
console.log(`${chalk.gray('[LOAD]')} >> ${chalk.blueBright('Loaded Event')} ${chalk.white(evtName)}`);
}
console.log(`\n${chalk.gray('[BOOT]')} >> ${chalk.blue('Loaded all Events')}`);
};

@ -10,7 +10,7 @@ module.exports = client => {
var response = require(`../responses/${responsef}`);
client.responses.triggers.push([response.name, response.condition]);
client.responses.commands.set(response.name, response);
console.log(`${chalk.gray('[LOG] ')} >> ${chalk.blueBright('Loaded Response')} ${chalk.white(response.name)}`);
console.log(`${chalk.gray('[LOAD]')} >> ${chalk.blueBright('Loaded Response')} ${chalk.white(response.name)}`);
}
console.log(`\n${chalk.gray('[BOOT]')} >> ${chalk.blue('Loaded all Responses')}`);
};

@ -22,5 +22,5 @@ module.exports = async (client) => {
let ora_lrCache = ora("Caching Level Roles...").start();
await require('./cache/lr')(client);
ora_lrCache.stop(); ora_lrCache.clear();
console.log(`${chalk.gray('[PROC]')} >> ${chalk.blueBright(`Cached`)} ${chalk.white(`${client.misc.cache.lxp.enabled.length}`)} ${chalk.blueBright(`guilds with Level Roles enabled.`)}`);
console.log(`${chalk.gray('[PROC]')} >> ${chalk.blueBright(`Cached`)} ${chalk.white(`${client.misc.cache.lxp.hasLevelRoles.length}`)} ${chalk.blueBright(`guilds with Level Roles enabled.`)}`);
};
Loading…
Cancel
Save