categorize cmds in file struct

master
Kit Kasune 4 years ago
parent 9b1255ccbd
commit dd4e8196be
  1. 8
      commands/anime/anime.js
  2. 82
      commands/dev/admin.js
  3. 4
      commands/dev/blacklist.js
  4. 2
      commands/dev/developer.js
  5. 94
      commands/dev/eval.js
  6. 2
      commands/dev/pull.js
  7. 2
      commands/dev/reload.js
  8. 6
      commands/dev/setstatus.js
  9. 82
      commands/dev/staff.js
  10. 82
      commands/dev/support.js
  11. 106
      commands/dev/vip.js
  12. 68
      commands/fun/8ball.js
  13. 286
      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. 62
      commands/misc/avatar.js
  23. 144
      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. 168
      commands/moderation/logs.js
  36. 12
      commands/moderation/response.js
  37. 4
      commands/moderation/softban.js
  38. 4
      commands/moderation/staffrole.js
  39. 52
      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,42 +1,42 @@
const Discord = require('discord.js');
const UserData = require('../models/user');
module.exports = {
name: "admin",
help: new Discord.MessageEmbed()
.setTitle("Help -> Admin")
.setDescription("Make a user a Natsuki admin")
.addField("Syntax", "`admin <add|remove|check> <@user|userID>`")
.addField("Notice", "This command is only available to Natsuki developers."),
meta: {
category: 'Developer',
description: "Add or remove users as Natsuki admins",
syntax: '`admin <add|remove|check> <@user|userID>`',
extra: "You can check if a user is an admin without being a developer."
},
async execute(message, msg, args, cmd, prefix, mention, client) {
if (!message.guild) {return message.reply("This is a guild-only command.");}
if (!args.length) {return message.channel.send(`Syntax: \`${prefix}\``);}
let person = mention ? mention : args[1] ? client.users.cache.has(args[1]) ? client.users.cache.get(args[1]) : null : null;
let tu = await UserData.findOne({uid: person ? person.id : message.author.id}) ? await UserData.findOne({uid: person ? person.id : message.author.id}) : new UserData({uid: person ? person.id : message.author.id});
if (['c', 'check'].includes(args[0])) {return message.reply(`${person ? person : message.member.displayName} ${tu.admin ? 'is' : 'is not'} a Natsuki Admin.`);}
if (!['a', 'add', 'r', 'remove'].includes(args[0])) {return message.reply("You must specify whether to `add` or `remove` someone as an admin.");}
if (!person) {return message.reply("You must mention someone to add as an admin, or use their ID.");}
let atu = await UserData.findOne({uid: message.author.id});
if (!atu && !atu.developer && !client.developers.includes(message.author.id)) {return message.reply('You must be a developer in order to add set admin statuses.');}
if (['a', 'add'].includes(args[0])) {tu.support = true; tu.staff = true; tu.admin = true;}
else {tu.admin = false; tu.developer = false;}
tu.save();
const logemb = (act) => new Discord.MessageEmbed()
.setAuthor(`Admin ${act}`, message.author.avatarURL())
.setDescription("A user's Admin status was updated.")
.setThumbnail(person.avatarURL({size: 1024}))
.addField("Name", person.username, true)
.addField("Developer", message.author.username, true)
.setColor("e8da3a")
.setFooter("Natsuki")
.setTimestamp();
client.guilds.cache.get('762707532417335296').channels.cache.get('762732961753595915').send(logemb(['a', 'add'].includes(args[0]) ? 'Added' : 'Removed'));
return message.reply(`${message.guild.members.cache.get(person.id).displayName} is no${['a', 'add'].includes(args[0]) ? 'w' : ' longer'} an admin!`);
}
const Discord = require('discord.js');
const UserData = require('../../models/user');
module.exports = {
name: "admin",
help: new Discord.MessageEmbed()
.setTitle("Help -> Admin")
.setDescription("Make a user a Natsuki admin")
.addField("Syntax", "`admin <add|remove|check> <@user|userID>`")
.addField("Notice", "This command is only available to Natsuki developers."),
meta: {
category: 'Developer',
description: "Add or remove users as Natsuki admins",
syntax: '`admin <add|remove|check> <@user|userID>`',
extra: "You can check if a user is an admin without being a developer."
},
async execute(message, msg, args, cmd, prefix, mention, client) {
if (!message.guild) {return message.reply("This is a guild-only command.");}
if (!args.length) {return message.channel.send(`Syntax: \`${prefix}\``);}
let person = mention ? mention : args[1] ? client.users.cache.has(args[1]) ? client.users.cache.get(args[1]) : null : null;
let tu = await UserData.findOne({uid: person ? person.id : message.author.id}) ? await UserData.findOne({uid: person ? person.id : message.author.id}) : new UserData({uid: person ? person.id : message.author.id});
if (['c', 'check'].includes(args[0])) {return message.reply(`${person ? person : message.member.displayName} ${tu.admin ? 'is' : 'is not'} a Natsuki Admin.`);}
if (!['a', 'add', 'r', 'remove'].includes(args[0])) {return message.reply("You must specify whether to `add` or `remove` someone as an admin.");}
if (!person) {return message.reply("You must mention someone to add as an admin, or use their ID.");}
let atu = await UserData.findOne({uid: message.author.id});
if (!atu && !atu.developer && !client.developers.includes(message.author.id)) {return message.reply('You must be a developer in order to add set admin statuses.');}
if (['a', 'add'].includes(args[0])) {tu.support = true; tu.staff = true; tu.admin = true;}
else {tu.admin = false; tu.developer = false;}
tu.save();
const logemb = (act) => new Discord.MessageEmbed()
.setAuthor(`Admin ${act}`, message.author.avatarURL())
.setDescription("A user's Admin status was updated.")
.setThumbnail(person.avatarURL({size: 1024}))
.addField("Name", person.username, true)
.addField("Developer", message.author.username, true)
.setColor("e8da3a")
.setFooter("Natsuki")
.setTimestamp();
client.guilds.cache.get('762707532417335296').channels.cache.get('762732961753595915').send(logemb(['a', 'add'].includes(args[0]) ? 'Added' : 'Removed'));
return message.reply(`${message.guild.members.cache.get(person.id).displayName} is no${['a', 'add'].includes(args[0]) ? 'w' : ' longer'} an 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,48 +1,48 @@
const Discord = require('discord.js');
const chalk = require('chalk');
const {Tag} = require('../util/tag');
const {TagFilter} = require('../util/tagfilter');
module.exports = {
name: 'eval',
aliases: ['ev', ':', 'e'],
help: "Evaluates raw JavaScript code. *This is a __developer-only__ command.* Usage: `{{p}}eval <code>`",
meta: {
category: 'Developer',
description: "Evaluates raw JavaScript code. Nerd access only.",
syntax: '`eval <code>`',
extra: null
},
execute(message, msg, args, cmd, prefix, mention, client) {
try {
if (!client.developers.includes(message.author.id)) {return message.channel.send("Sorry, but I've got trust issues, so only me devs can go commanding me around like that.");};
if (!args.length) return message.channel.send(`Syntax: \`${prefix}eval <code>\``);
let options = new TagFilter([new Tag(['s', 'silent', 'nr', 'noreply'], 'silent', 'toggle')]).test(args[0]);
if (options.silent) {args.shift();}
if (!args.length) {return message.channel.send("Silly goose, if you want me to do something, you have to tell me what!");}
const result = new Promise((resolve) => resolve(eval(args.join(' '))));
return result.then((output) => {
if (typeof output !== 'string') {
output = require('util').inspect(output, {depth: 0});
}
output = output.replace(client.config.token, 'Client Token')
.replace(client.config.database.password, 'Database Password')
.replace(client.config.database.cluster, 'Database Cluster');
return options.silent ? null : message.channel.send(new Discord.MessageEmbed()
.setTitle('Client Evaluation')
.setDescription(`\`\`\`js\n${output}\n\`\`\``)
.setColor('c375f0')
.setFooter(`Natsuki`, client.user.avatarURL())
.setTimestamp());
}).catch(error => {return message.channel.send(`Error: \`${error}\`.`);});
} catch (error) {
let date = new Date; date = date.toString().slice(date.toString().search(":") - 2, date.toString().search(":") + 6);
console.error(`\n${chalk.red('[ERROR]')} >> ${chalk.yellow(`At [${date}] | Occurred while trying to run n?eval`)}`, error);
return message.channel.send(`Error: \`${error}\`.`);
}
},
const Discord = require('discord.js');
const chalk = require('chalk');
const {Tag} = require('../../util/tag');
const {TagFilter} = require('../../util/tagfilter');
module.exports = {
name: 'eval',
aliases: ['ev', ':', 'e'],
help: "Evaluates raw JavaScript code. *This is a __developer-only__ command.* Usage: `{{p}}eval <code>`",
meta: {
category: 'Developer',
description: "Evaluates raw JavaScript code. Nerd access only.",
syntax: '`eval <code>`',
extra: null
},
execute(message, msg, args, cmd, prefix, mention, client) {
try {
if (!client.developers.includes(message.author.id)) {return message.channel.send("Sorry, but I've got trust issues, so only me devs can go commanding me around like that.");};
if (!args.length) return message.channel.send(`Syntax: \`${prefix}eval <code>\``);
let options = new TagFilter([new Tag(['s', 'silent', 'nr', 'noreply'], 'silent', 'toggle')]).test(args[0]);
if (options.silent) {args.shift();}
if (!args.length) {return message.channel.send("Silly goose, if you want me to do something, you have to tell me what!");}
const result = new Promise((resolve) => resolve(eval(args.join(' '))));
return result.then((output) => {
if (typeof output !== 'string') {
output = require('util').inspect(output, {depth: 0});
}
output = output.replace(client.config.token, 'Client Token')
.replace(client.config.database.password, 'Database Password')
.replace(client.config.database.cluster, 'Database Cluster');
return options.silent ? null : message.channel.send(new Discord.MessageEmbed()
.setTitle('Client Evaluation')
.setDescription(`\`\`\`js\n${output}\n\`\`\``)
.setColor('c375f0')
.setFooter(`Natsuki`, client.user.avatarURL())
.setTimestamp());
}).catch(error => {return message.channel.send(`Error: \`${error}\`.`);});
} catch (error) {
let date = new Date; date = date.toString().slice(date.toString().search(":") - 2, date.toString().search(":") + 6);
console.error(`\n${chalk.red('[ERROR]')} >> ${chalk.yellow(`At [${date}] | Occurred while trying to run n?eval`)}`, error);
return message.channel.send(`Error: \`${error}\`.`);
}
},
};

@ -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,42 +1,42 @@
const Discord = require('discord.js');
const UserData = require('../models/user');
module.exports = {
name: "staff",
help: new Discord.MessageEmbed()
.setTitle("Help -> Staff")
.setDescription("Make a user a Natsuki staff member")
.addField("Syntax", "`staff <add|remove|check> <@user|userID>`")
.addField("Notice", "This command is only available to Natsuki developers."),
meta: {
category: 'Developer',
description: "Add or remove users as Natsuki staff",
syntax: '`staff <add|remove|check> <@user|userID>`',
extra: "You can check if a user is staff without being a developer."
},
async execute(message, msg, args, cmd, prefix, mention, client) {
if (!message.guild) {return message.reply("This is a guild-only command.");}
if (!args.length) {return message.channel.send(`Syntax: \`${prefix}\``);}
let person = mention ? mention : args[1] ? client.users.cache.has(args[1]) ? client.users.cache.get(args[1]) : null : null;
let tu = await UserData.findOne({uid: person ? person.id : message.author.id}) ? await UserData.findOne({uid: person ? person.id : message.author.id}) : new UserData({uid: person ? person.id : message.author.id});
if (['c', 'check'].includes(args[0])) {return message.reply(`${person ? person : message.member.displayName} ${tu.staff ? 'is' : 'is not'} a part of Natsuki Staff.`);}
if (!['a', 'add', 'r', 'remove'].includes(args[0])) {return message.reply("You must specify whether to `add` or `remove` someone as a Staff Member.");}
if (!person) {return message.reply("You must mention someone to add as a staff member, or use their ID.");}
let atu = await UserData.findOne({uid: message.author.id});
if (!atu && !atu.developer && !client.developers.includes(message.author.id)) {return message.reply('You must be a developer in order to add set staff member statuses.');}
if (['a', 'add'].includes(args[0])) {tu.support = true; tu.staff = true;}
else {tu.staff = false; tu.admin = false; tu.developer = false;}
tu.save();
const logemb = (act) => new Discord.MessageEmbed()
.setAuthor(`Staff ${act}`, message.author.avatarURL())
.setDescription("A user's Staff status was updated.")
.setThumbnail(person.avatarURL({size: 1024}))
.addField("Name", person.username, true)
.addField("Developer", message.author.username, true)
.setColor("e8da3a")
.setFooter("Natsuki")
.setTimestamp();
client.guilds.cache.get('762707532417335296').channels.cache.get('762732961753595915').send(logemb(['a', 'add'].includes(args[0]) ? 'Added' : 'Removed'));
return message.reply(`${message.guild.members.cache.get(person.id).displayName} is no${['a', 'add'].includes(args[0]) ? 'w' : ' longer'} a staff member!`);
}
const Discord = require('discord.js');
const UserData = require('../../models/user');
module.exports = {
name: "staff",
help: new Discord.MessageEmbed()
.setTitle("Help -> Staff")
.setDescription("Make a user a Natsuki staff member")
.addField("Syntax", "`staff <add|remove|check> <@user|userID>`")
.addField("Notice", "This command is only available to Natsuki developers."),
meta: {
category: 'Developer',
description: "Add or remove users as Natsuki staff",
syntax: '`staff <add|remove|check> <@user|userID>`',
extra: "You can check if a user is staff without being a developer."
},
async execute(message, msg, args, cmd, prefix, mention, client) {
if (!message.guild) {return message.reply("This is a guild-only command.");}
if (!args.length) {return message.channel.send(`Syntax: \`${prefix}\``);}
let person = mention ? mention : args[1] ? client.users.cache.has(args[1]) ? client.users.cache.get(args[1]) : null : null;
let tu = await UserData.findOne({uid: person ? person.id : message.author.id}) ? await UserData.findOne({uid: person ? person.id : message.author.id}) : new UserData({uid: person ? person.id : message.author.id});
if (['c', 'check'].includes(args[0])) {return message.reply(`${person ? person : message.member.displayName} ${tu.staff ? 'is' : 'is not'} a part of Natsuki Staff.`);}
if (!['a', 'add', 'r', 'remove'].includes(args[0])) {return message.reply("You must specify whether to `add` or `remove` someone as a Staff Member.");}
if (!person) {return message.reply("You must mention someone to add as a staff member, or use their ID.");}
let atu = await UserData.findOne({uid: message.author.id});
if (!atu && !atu.developer && !client.developers.includes(message.author.id)) {return message.reply('You must be a developer in order to add set staff member statuses.');}
if (['a', 'add'].includes(args[0])) {tu.support = true; tu.staff = true;}
else {tu.staff = false; tu.admin = false; tu.developer = false;}
tu.save();
const logemb = (act) => new Discord.MessageEmbed()
.setAuthor(`Staff ${act}`, message.author.avatarURL())
.setDescription("A user's Staff status was updated.")
.setThumbnail(person.avatarURL({size: 1024}))
.addField("Name", person.username, true)
.addField("Developer", message.author.username, true)
.setColor("e8da3a")
.setFooter("Natsuki")
.setTimestamp();
client.guilds.cache.get('762707532417335296').channels.cache.get('762732961753595915').send(logemb(['a', 'add'].includes(args[0]) ? 'Added' : 'Removed'));
return message.reply(`${message.guild.members.cache.get(person.id).displayName} is no${['a', 'add'].includes(args[0]) ? 'w' : ' longer'} a staff member!`);
}
};

@ -1,42 +1,42 @@
const Discord = require('discord.js');
const UserData = require('../models/user');
module.exports = {
name: "support",
help: new Discord.MessageEmbed()
.setTitle("Help -> Support")
.setDescription("Make a user a Natsuki Support Team member")
.addField("Syntax", "`support <add|remove|check> <@user|userID>`")
.addField("Notice", "This command is only available to Natsuki admin."),
meta: {
category: 'Developer',
description: "Add or remove users as Natsuki support",
syntax: '`support <add|remove|check> <@user|userID>`',
extra: "You can check if a user is a support member without being a developer."
},
async execute(message, msg, args, cmd, prefix, mention, client) {
if (!message.guild) {return message.reply("This is a guild-only command.");}
if (!args.length) {return message.channel.send(`Syntax: \`${prefix}\``);}
let person = mention ? mention : args[1] ? client.users.cache.has(args[1]) ? client.users.cache.get(args[1]) : null : null;
let tu = await UserData.findOne({uid: person ? person.id : message.author.id}) ? await UserData.findOne({uid: person ? person.id : message.author.id}) : new UserData({uid: person ? person.id : message.author.id});
if (['c', 'check'].includes(args[0])) {return message.reply(`${person ? person : message.member.displayName} ${tu.support ? 'is' : 'is not'} a part of Natsuki Support.`);}
if (!['a', 'add', 'r', 'remove'].includes(args[0])) {return message.reply("You must specify whether to `add` or `remove` someone as a Support Team Member.");}
if (!person) {return message.reply("You must mention someone to add as a support member, or use their ID.");}
let atu = await UserData.findOne({uid: message.author.id});
if (!atu && !atu.admin) {return message.reply('You must be an admin in order to add set support team member statuses.');}
if (['a', 'add'].includes(args[0])) {tu.support = true;}
else {tu.support = false; tu.staff = false; tu.admin = false; tu.developer = false;}
tu.save();
const logemb = (act) => new Discord.MessageEmbed()
.setAuthor(`Support ${act}`, message.author.avatarURL())
.setDescription("A user's Support status was updated.")
.setThumbnail(person.avatarURL({size: 1024}))
.addField("Name", person.username, true)
.addField("Developer", message.author.username, true)
.setColor("e8da3a")
.setFooter("Natsuki")
.setTimestamp();
client.guilds.cache.get('762707532417335296').channels.cache.get('762732961753595915').send(logemb(['a', 'add'].includes(args[0]) ? 'Added' : 'Removed'));
return message.reply(`${message.guild.members.cache.get(person.id).displayName} is no${['a', 'add'].includes(args[0]) ? 'w' : ' longer'} a Support Team member!`);
}
const Discord = require('discord.js');
const UserData = require('../../models/user');
module.exports = {
name: "support",
help: new Discord.MessageEmbed()
.setTitle("Help -> Support")
.setDescription("Make a user a Natsuki Support Team member")
.addField("Syntax", "`support <add|remove|check> <@user|userID>`")
.addField("Notice", "This command is only available to Natsuki admin."),
meta: {
category: 'Developer',
description: "Add or remove users as Natsuki support",
syntax: '`support <add|remove|check> <@user|userID>`',
extra: "You can check if a user is a support member without being a developer."
},
async execute(message, msg, args, cmd, prefix, mention, client) {
if (!message.guild) {return message.reply("This is a guild-only command.");}
if (!args.length) {return message.channel.send(`Syntax: \`${prefix}\``);}
let person = mention ? mention : args[1] ? client.users.cache.has(args[1]) ? client.users.cache.get(args[1]) : null : null;
let tu = await UserData.findOne({uid: person ? person.id : message.author.id}) ? await UserData.findOne({uid: person ? person.id : message.author.id}) : new UserData({uid: person ? person.id : message.author.id});
if (['c', 'check'].includes(args[0])) {return message.reply(`${person ? person : message.member.displayName} ${tu.support ? 'is' : 'is not'} a part of Natsuki Support.`);}
if (!['a', 'add', 'r', 'remove'].includes(args[0])) {return message.reply("You must specify whether to `add` or `remove` someone as a Support Team Member.");}
if (!person) {return message.reply("You must mention someone to add as a support member, or use their ID.");}
let atu = await UserData.findOne({uid: message.author.id});
if (!atu && !atu.admin) {return message.reply('You must be an admin in order to add set support team member statuses.');}
if (['a', 'add'].includes(args[0])) {tu.support = true;}
else {tu.support = false; tu.staff = false; tu.admin = false; tu.developer = false;}
tu.save();
const logemb = (act) => new Discord.MessageEmbed()
.setAuthor(`Support ${act}`, message.author.avatarURL())
.setDescription("A user's Support status was updated.")
.setThumbnail(person.avatarURL({size: 1024}))
.addField("Name", person.username, true)
.addField("Developer", message.author.username, true)
.setColor("e8da3a")
.setFooter("Natsuki")
.setTimestamp();
client.guilds.cache.get('762707532417335296').channels.cache.get('762732961753595915').send(logemb(['a', 'add'].includes(args[0]) ? 'Added' : 'Removed'));
return message.reply(`${message.guild.members.cache.get(person.id).displayName} is no${['a', 'add'].includes(args[0]) ? 'w' : ' longer'} a Support Team member!`);
}
};

@ -1,54 +1,54 @@
const Discord = require("discord.js");
module.exports = {
name: "vip",
aliases: ["premium"],
help: new Discord.MessageEmbed()
.setTitle("Help -> VIP")
.setDescription("Toggle a server as VIP. This grants a few small bonuses to your server that you can't get anywhere else!\n\nWant to become a VIP? Support the bot by [joining the support server](), donating to the bot's creators, or promoting/spreading the bot to other servers.")
.addField("Syntax", "`vip <add|remove|check>`")
.addField("Notice", "This command is **developer-only**."),
meta: {
category: 'Developer',
description: "Set server VIP status",
syntax: '`vip <add|remove|check>`',
extra: "This command is mostly cosmetic as there are no real perks *yet*"
},
async execute(message, msg, args, cmd, prefix, mention, client) {
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 logemb = (act) => new Discord.MessageEmbed()
.setAuthor(`VIP Server ${act}`, message.author.avatarURL())
.setDescription("A Server's VIP status was updated.")
.setThumbnail(message.guild.iconURL({size: 1024}))
.addField("Name", message.guild.name, true)
.addField("Admin", message.author.username, true)
.setColor("e8da3a")
.setFooter("Natsuki")
.setTimestamp();
if (['add', 'a', 'make', 'm'].includes(args[0])) {
let tguild = await GuildSettings.findOne({gid: message.guild.id})
? await GuildSettings.findOne({gid: message.guild.id})
: new GuildSettings({gid: message.guild.id});
if (tguild.vip === true) {return message.reply("This server is already a VIP server.");}
tguild.vip = true;
tguild.save();
client.guilds.cache.get('762707532417335296').channels.cache.get('762732961753595915').send(logemb("Added"));
return message.reply("This server is now a VIP server!");
} else if (['remove', 'r', 'delete', 'd'].includes(args[0])) {
let tguild = await GuildSettings.findOne({gid: message.guild.id});
if (tguild) {
if (tguild.vip === false) {return message.reply("This server wasn't a VIP server anyways...");}
await GuildSettings.findOneAndUpdate({gid: message.guild.id, vip: false});
client.guilds.cache.get('762707532417335296').channels.cache.get('762732961753595915').send(logemb("Removed"));
} else {return message.reply("This server wasn't a VIP server anyways...");}
return message.reply("This server is no longer a VIP server!");
} else if (['check', 'c', 'view', 'v'].includes(args[0])) {
let tguild = await GuildSettings.findOne({gid: message.guild.id});
return message.reply((tguild && tguild.vip) ? 'This server is a VIP server.' : 'This server is not a VIP server.');
}
}
const Discord = require("discord.js");
module.exports = {
name: "vip",
aliases: ["premium"],
help: new Discord.MessageEmbed()
.setTitle("Help -> VIP")
.setDescription("Toggle a server as VIP. This grants a few small bonuses to your server that you can't get anywhere else!\n\nWant to become a VIP? Support the bot by [joining the support server](), donating to the bot's creators, or promoting/spreading the bot to other servers.")
.addField("Syntax", "`vip <add|remove|check>`")
.addField("Notice", "This command is **developer-only**."),
meta: {
category: 'Developer',
description: "Set server VIP status",
syntax: '`vip <add|remove|check>`',
extra: "This command is mostly cosmetic as there are no real perks *yet*"
},
async execute(message, msg, args, cmd, prefix, mention, client) {
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 logemb = (act) => new Discord.MessageEmbed()
.setAuthor(`VIP Server ${act}`, message.author.avatarURL())
.setDescription("A Server's VIP status was updated.")
.setThumbnail(message.guild.iconURL({size: 1024}))
.addField("Name", message.guild.name, true)
.addField("Admin", message.author.username, true)
.setColor("e8da3a")
.setFooter("Natsuki")
.setTimestamp();
if (['add', 'a', 'make', 'm'].includes(args[0])) {
let tguild = await GuildSettings.findOne({gid: message.guild.id})
? await GuildSettings.findOne({gid: message.guild.id})
: new GuildSettings({gid: message.guild.id});
if (tguild.vip === true) {return message.reply("This server is already a VIP server.");}
tguild.vip = true;
tguild.save();
client.guilds.cache.get('762707532417335296').channels.cache.get('762732961753595915').send(logemb("Added"));
return message.reply("This server is now a VIP server!");
} else if (['remove', 'r', 'delete', 'd'].includes(args[0])) {
let tguild = await GuildSettings.findOne({gid: message.guild.id});
if (tguild) {
if (tguild.vip === false) {return message.reply("This server wasn't a VIP server anyways...");}
await GuildSettings.findOneAndUpdate({gid: message.guild.id, vip: false});
client.guilds.cache.get('762707532417335296').channels.cache.get('762732961753595915').send(logemb("Removed"));
} else {return message.reply("This server wasn't a VIP server anyways...");}
return message.reply("This server is no longer a VIP server!");
} else if (['check', 'c', 'view', 'v'].includes(args[0])) {
let tguild = await GuildSettings.findOne({gid: message.guild.id});
return message.reply((tguild && tguild.vip) ? 'This server is a VIP server.' : 'This server is not a VIP server.');
}
}
};

@ -1,35 +1,35 @@
const Discord = require("discord.js");
module.exports = {
name: "8ball",
aliases: ["8b"],
help: new Discord.MessageEmbed()
.setTitle("Help -> 8ball")
.setDescription("Gives you moral support, decides if you really do want that third taco, or helps you decide on your existential crisis. Answers come with an accuracy guarantee of 0%!")
.addField("Syntax", "`8ball <question>`"),
meta: {
category: 'Fun',
description: "Gives you moral support, decides if you really do want that third taco, or helps you decide on your existential crisis. Answers come with an accuracy guarantee of 0%!",
syntax: '`8ball <question>`',
extra: null
},
execute(message, msg, args, cmd, prefix, mention, client) {
if (!args.length) {return message.channel.send(`Syntax: \`${prefix}8ball <question>\``);}
let question = args.join(" ");
if (question.length > 230) {return message.reply("Listen, I'm no fortune-teller. I can't help you with a question that long!");}
let responses = [
/*Positive Responses*/ "Yes!", "I think so", "Possibly", "Certainly", "Definitely", "Absolutely", "Sure!", "Most Likely", "I believe so", "If you're asking for my honest opinion... yes"
/*Negative Responses*/ ,"No!", "I don't think so", "Probably not", "Impossible", "Nope", "Absolutely *not*", "Nah", "Doubt it", "I don't believe so", "If you're asking for my honest opinion... no"
/*Neutral Responses */ ,"Maybe", "I'm not sure", "I'll think about it", "Uhh Natsuki isn't here right now. I can take a message?", "I'm sure if you look deep within your heart, which is currently all over that tree, you'll find the answer", "I mean, if you think so...", "I don't have an opinion on that.", "I'll choose to remain silent."
];
let name = message.guild ? message.member.displayName : message.author.username;
return message.reply(new Discord.MessageEmbed()
.setAuthor("8ball Question", message.author.avatarURL())
.setDescription("**Question:** " + question + "\n**Answer:** " + responses[Math.floor(Math.random() * responses.length)])
.setColor("c375f0")
.setFooter(`Asked by ${name} | Natsuki`)
.setTimestamp());
}
const Discord = require("discord.js");
module.exports = {
name: "8ball",
aliases: ["8b"],
help: new Discord.MessageEmbed()
.setTitle("Help -> 8ball")
.setDescription("Gives you moral support, decides if you really do want that third taco, or helps you decide on your existential crisis. Answers come with an accuracy guarantee of 0%!")
.addField("Syntax", "`8ball <question>`"),
meta: {
category: 'Fun',
description: "Gives you moral support, decides if you really do want that third taco, or helps you decide on your existential crisis. Answers come with an accuracy guarantee of 0%!",
syntax: '`8ball <question>`',
extra: null
},
execute(message, msg, args, cmd, prefix, mention, client) {
if (!args.length) {return message.channel.send(`Syntax: \`${prefix}8ball <question>\``);}
let question = args.join(" ");
if (question.length > 230) {return message.reply("Listen, I'm no fortune-teller. I can't help you with a question that long!");}
let responses = [
/*Positive Responses*/ "Yes!", "I think so", "Possibly", "Certainly", "Definitely", "Absolutely", "Sure!", "Most Likely", "I believe so", "If you're asking for my honest opinion... yes"
/*Negative Responses*/ ,"No!", "I don't think so", "Probably not", "Impossible", "Nope", "Absolutely *not*", "Nah", "Doubt it", "I don't believe so", "If you're asking for my honest opinion... no"
/*Neutral Responses */ ,"Maybe", "I'm not sure", "I'll think about it", "Uhh Natsuki isn't here right now. I can take a message?", "I'm sure if you look deep within your heart, which is currently all over that tree, you'll find the answer", "I mean, if you think so...", "I don't have an opinion on that.", "I'll choose to remain silent."
];
let name = message.guild ? message.member.displayName : message.author.username;
return message.reply(new Discord.MessageEmbed()
.setAuthor("8ball Question", message.author.avatarURL())
.setDescription("**Question:** " + question + "\n**Answer:** " + responses[Math.floor(Math.random() * responses.length)])
.setColor("c375f0")
.setFooter(`Asked by ${name} | Natsuki`)
.setTimestamp());
}
};

@ -1,144 +1,144 @@
const Discord = require('discord.js');
const moment = require('moment');
const VC = require('../models/vscount');
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",
"Bass:tm:", "cranking the music just a little too loud", "trying to swim in lava", "an unknown cause",
"Despacito", "something really cliche and unoriginal", "'shrooms",
"clicking 'I agree' without reading the Terms of Service", "alchemy", "rusty spoons",
"picking the wrong waifu", "body pillows", "fur-con", "something to do with lamb sauce",
"grandma's cookies"
]; // a list of preset death methods that can occur
const before = [
"A name is being written...", "Someone will perish soon...", "A body is *about* to be discovered...",
"{p} is scribbling something in their notebook...", "\*Manical laughter echoes around you*...",
"{p} laughs maniacally..."
]; // things it says before the response is sent
const responses = {
/*an obj controlling the possible formats for the death note report*/
news: {
titles: ["Breaking News"],
texts: [
"This just in: **{p}** was found dead at **{ds}** today.\n\nAfter some investigation, the authorities ruled the cause of death to be **{c}**.",
"We're now live at the crime scene where it is believed that **{p}** died because of **{c}**.",
"Authorities are reporting what is believed to be another Kira case, where **{c}** has taken the life of **{p}**."
],
images: [],
}, // a news report of the dead body
writes: {
titles: ["Something sinister just happened", "A name has been written", "Fate has been changed"],
texts: [
"With a maniacal laugh, **{w}** writes \"**{p}**\" in their Death Note. And the cause of death? They've written **{c}**.",
"**{w}** has sealed **{pa}** fate to die by **{c}**."
],
images: []
}, // "so-and-so writes blah blah blah's name in their death note"
/*hasdied: {
texts: [],
images: []
}, // "so-and-so has died by...",
unserious: {
texts: [],
images: []
} // other methods, mainly the un-serious or joking ones */
};
//responses.unserious.images = responses.hasdied.images;
module.exports = {
name: "deathnote",
aliases: ['dn'],
help: new Discord.MessageEmbed()
.setTitle("Help -> Death Note")
.setDescription("Congratulations! You've picked up a death note. Write someone's name in it, and see for yourself if it's the real deal...")
.addField("Syntax", "\`deathnote <@member> [method of death]\`"),
meta: {
category: 'Fun',
description: "Write someone's name in your deathnote. I'm not legally responsible for anything that happens after that.",
syntax: '`deathnote <@member> [method of death]`',
extra: null
},
async execute(message, msg, args, cmd, prefix, mention, client) {
if (!message.guild) {return message.reply("Unfortunately, this is a **guild-only** command!");}
if (!args.length) {return message.channel.send(`Syntax: \`${prefix}deathnote <@member> [method of death]\``);}
if (args[0] === "kill" || args[0] === "k") {args.shift();} // if someone adds in 'kill' it'll remove it and act like it wasn't there, proceeding as normal.
//if (!args[0].trim().match(/^<@(?:\!?)\d+>$/)) {return message.reply("You have to mention someone!");}
if (mention && mention.id === message.author.id) {return message.reply("Hehe I won't let you write your own name in the notebook! Just leave it somewhere for a few days and someone else will take it. Maybe they'll write your name...");} // users can't mention themselves
if (mention && mention.id === client.user.id) {return message.reply("You can't kill me! Little did you know, I'm actually a death god!");}
if (mention && mention.bot) {return message.reply("As a bot, I simply cannot let you attempt to kill another fellow bot!");}
let reptype = responses[Object.keys(responses)[Math.floor(Math.random() * Object.keys(responses).length)]]; // report type
let title = reptype.titles[Math.floor(Math.random() * reptype.titles.length)];
let options = new TagFilter([
new Tag(['method', '-m', 'cause', '-c'], 'method', 'append'),
new Tag(['victim', 'v', 'against', 'a', 'name', 'n'], 'victim', 'append')
]).test(args.join(" "));
let death = (!options.victim || (options.victim && !options.victim.length)) && (!options.method || (options.method && !options.method.length)) && args.length > 1
? args.join(" ").slice(args[0].length + 1)
: deaths[Math.floor(Math.random() * deaths.length)]; //kill method
if (options.method && options.method.length) {death = options.method;}
if (death.length > 750) {return message.channel.send("I'd rather you didn't try to fill the death note with a 7-page double-spaced essay in Times New Roman containing an advanced trajectory theorem on the death of your poor target.");}
if (!mention && (!options.victim || !options.victim.length)) {return message.reply("You have to write their name down in order to kill them! (In other words, please mention the user whose name you wish to write.)");}
if (options.victim && options.victim.length) {
let vargs = options.victim.trim().split(/\s+/g);
let nvargs = [];
let varg; for (varg of vargs) {
if (varg.match(/^<@(?:!?)\d+>$/)) {
nvargs.push(message.guild.members.cache.has(varg.slice(varg.search(/\d/), varg.search('>'))) ? message.guild.members.cache.get(varg.slice(varg.search(/\d/), varg.search('>'))).displayName : varg);
} else {nvargs.push(varg);}
}
options.victim = nvargs.join(" ").trim();
}
let victim = options.victim && options.victim.length ? options.victim : message.mentions.members.first().displayName;
let killer = message.member;
let pretext = before[Math.floor(Math.random() * before.length)].replace(/{p}/g, victim);
let note = await message.channel.send(new Discord.MessageEmbed()
.setDescription(pretext)
.setColor('c375f0')
.setFooter("Natsuki", client.user.avatarURL())
.setTimestamp()
);
await require('../util/wait')(2500);
let text = reptype.texts[Math.floor(Math.random() * reptype.texts.length)]
.replace(/{p}/g, victim) //{p} = victim
.replace(/{pa}/g, victim.toLowerCase().endsWith('s') ? `${victim}'` : `${victim}'s`) //{pa} = victim but with a formatted apostrophe like "WubzyGD's"
.replace(/{c}/g, death) // {c} = death method
.replace(/{w}/g, killer.displayName) // {w} = killer or writer
.replace(/{ds}/g, moment().format("h:mm a")); // {ds} = date small, basically just the time.
// Create and format the kill text
let dns;
if (mention && mention.id) {
dns = await VC.findOne({uid: message.author.id, countOf: 'dn'}) || new VC({uid: message.author.id, countOf: 'dn'});
dns.against[mention.id] = dns.against[mention.id] ? dns.against[mention.id] + 1 : 1;
dns.total++;
dns.markModified(`against.${mention.id}`);
dns.save();
}
let finalEmbed = new Discord.MessageEmbed()
.setAuthor(title, message.author.avatarURL())
.setDescription(`${text}${dns ? `\n\n_Their name is in your deathnote **${dns.against[mention.id] === 1 ? 'once' : `${dns.against[mention.id]} times`}.**_` : ''}`)
.setColor('c375f0')
.setFooter(`Natsuki${dns ? ` | ${dns.total} name${dns.total === 1 ? ' has been' : 's'} written in your deathnote!` : ''}`)
.setTimestamp();
if (mention) {finalEmbed.setThumbnail(mention.avatarURL({size: 1024}));}
return note.edit(finalEmbed);
}
const Discord = require('discord.js');
const moment = require('moment');
const VC = require('../../models/vscount');
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",
"Bass:tm:", "cranking the music just a little too loud", "trying to swim in lava", "an unknown cause",
"Despacito", "something really cliche and unoriginal", "'shrooms",
"clicking 'I agree' without reading the Terms of Service", "alchemy", "rusty spoons",
"picking the wrong waifu", "body pillows", "fur-con", "something to do with lamb sauce",
"grandma's cookies"
]; // a list of preset death methods that can occur
const before = [
"A name is being written...", "Someone will perish soon...", "A body is *about* to be discovered...",
"{p} is scribbling something in their notebook...", "\*Manical laughter echoes around you*...",
"{p} laughs maniacally..."
]; // things it says before the response is sent
const responses = {
/*an obj controlling the possible formats for the death note report*/
news: {
titles: ["Breaking News"],
texts: [
"This just in: **{p}** was found dead at **{ds}** today.\n\nAfter some investigation, the authorities ruled the cause of death to be **{c}**.",
"We're now live at the crime scene where it is believed that **{p}** died because of **{c}**.",
"Authorities are reporting what is believed to be another Kira case, where **{c}** has taken the life of **{p}**."
],
images: [],
}, // a news report of the dead body
writes: {
titles: ["Something sinister just happened", "A name has been written", "Fate has been changed"],
texts: [
"With a maniacal laugh, **{w}** writes \"**{p}**\" in their Death Note. And the cause of death? They've written **{c}**.",
"**{w}** has sealed **{pa}** fate to die by **{c}**."
],
images: []
}, // "so-and-so writes blah blah blah's name in their death note"
/*hasdied: {
texts: [],
images: []
}, // "so-and-so has died by...",
unserious: {
texts: [],
images: []
} // other methods, mainly the un-serious or joking ones */
};
//responses.unserious.images = responses.hasdied.images;
module.exports = {
name: "deathnote",
aliases: ['dn'],
help: new Discord.MessageEmbed()
.setTitle("Help -> Death Note")
.setDescription("Congratulations! You've picked up a death note. Write someone's name in it, and see for yourself if it's the real deal...")
.addField("Syntax", "\`deathnote <@member> [method of death]\`"),
meta: {
category: 'Fun',
description: "Write someone's name in your deathnote. I'm not legally responsible for anything that happens after that.",
syntax: '`deathnote <@member> [method of death]`',
extra: null
},
async execute(message, msg, args, cmd, prefix, mention, client) {
if (!message.guild) {return message.reply("Unfortunately, this is a **guild-only** command!");}
if (!args.length) {return message.channel.send(`Syntax: \`${prefix}deathnote <@member> [method of death]\``);}
if (args[0] === "kill" || args[0] === "k") {args.shift();} // if someone adds in 'kill' it'll remove it and act like it wasn't there, proceeding as normal.
//if (!args[0].trim().match(/^<@(?:\!?)\d+>$/)) {return message.reply("You have to mention someone!");}
if (mention && mention.id === message.author.id) {return message.reply("Hehe I won't let you write your own name in the notebook! Just leave it somewhere for a few days and someone else will take it. Maybe they'll write your name...");} // users can't mention themselves
if (mention && mention.id === client.user.id) {return message.reply("You can't kill me! Little did you know, I'm actually a death god!");}
if (mention && mention.bot) {return message.reply("As a bot, I simply cannot let you attempt to kill another fellow bot!");}
let reptype = responses[Object.keys(responses)[Math.floor(Math.random() * Object.keys(responses).length)]]; // report type
let title = reptype.titles[Math.floor(Math.random() * reptype.titles.length)];
let options = new TagFilter([
new Tag(['method', '-m', 'cause', '-c'], 'method', 'append'),
new Tag(['victim', 'v', 'against', 'a', 'name', 'n'], 'victim', 'append')
]).test(args.join(" "));
let death = (!options.victim || (options.victim && !options.victim.length)) && (!options.method || (options.method && !options.method.length)) && args.length > 1
? args.join(" ").slice(args[0].length + 1)
: deaths[Math.floor(Math.random() * deaths.length)]; //kill method
if (options.method && options.method.length) {death = options.method;}
if (death.length > 750) {return message.channel.send("I'd rather you didn't try to fill the death note with a 7-page double-spaced essay in Times New Roman containing an advanced trajectory theorem on the death of your poor target.");}
if (!mention && (!options.victim || !options.victim.length)) {return message.reply("You have to write their name down in order to kill them! (In other words, please mention the user whose name you wish to write.)");}
if (options.victim && options.victim.length) {
let vargs = options.victim.trim().split(/\s+/g);
let nvargs = [];
let varg; for (varg of vargs) {
if (varg.match(/^<@(?:!?)\d+>$/)) {
nvargs.push(message.guild.members.cache.has(varg.slice(varg.search(/\d/), varg.search('>'))) ? message.guild.members.cache.get(varg.slice(varg.search(/\d/), varg.search('>'))).displayName : varg);
} else {nvargs.push(varg);}
}
options.victim = nvargs.join(" ").trim();
}
let victim = options.victim && options.victim.length ? options.victim : message.mentions.members.first().displayName;
let killer = message.member;
let pretext = before[Math.floor(Math.random() * before.length)].replace(/{p}/g, victim);
let note = await message.channel.send(new Discord.MessageEmbed()
.setDescription(pretext)
.setColor('c375f0')
.setFooter("Natsuki", client.user.avatarURL())
.setTimestamp()
);
await require('../../util/wait')(2500);
let text = reptype.texts[Math.floor(Math.random() * reptype.texts.length)]
.replace(/{p}/g, victim) //{p} = victim
.replace(/{pa}/g, victim.toLowerCase().endsWith('s') ? `${victim}'` : `${victim}'s`) //{pa} = victim but with a formatted apostrophe like "WubzyGD's"
.replace(/{c}/g, death) // {c} = death method
.replace(/{w}/g, killer.displayName) // {w} = killer or writer
.replace(/{ds}/g, moment().format("h:mm a")); // {ds} = date small, basically just the time.
// Create and format the kill text
let dns;
if (mention && mention.id) {
dns = await VC.findOne({uid: message.author.id, countOf: 'dn'}) || new VC({uid: message.author.id, countOf: 'dn'});
dns.against[mention.id] = dns.against[mention.id] ? dns.against[mention.id] + 1 : 1;
dns.total++;
dns.markModified(`against.${mention.id}`);
dns.save();
}
let finalEmbed = new Discord.MessageEmbed()
.setAuthor(title, message.author.avatarURL())
.setDescription(`${text}${dns ? `\n\n_Their name is in your deathnote **${dns.against[mention.id] === 1 ? 'once' : `${dns.against[mention.id]} times`}.**_` : ''}`)
.setColor('c375f0')
.setFooter(`Natsuki${dns ? ` | ${dns.total} name${dns.total === 1 ? ' has been' : 's'} written in your deathnote!` : ''}`)
.setTimestamp();
if (mention) {finalEmbed.setThumbnail(mention.avatarURL({size: 1024}));}
return note.edit(finalEmbed);
}
};

@ -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,32 +1,32 @@
const Discord = require('discord.js');
const {Tag} = require('../util/tag');
const {TagFilter} = require('../util/tagfilter');
module.exports = {
name: "avatar",
aliases: ['av', 'a', 'pfp'],
help: "Use `{{p}}avatar` to get your own profile picture, or mention someone to get theirs!",
meta: {
category: 'Misc',
description: "Flare your avatar or peek at others'",
syntax: '`avatar [@mention]`',
extra: null
},
async execute(message, msg, args, cmd, prefix, mention, client) {
let member = !args.length ? message.author : mention ? mention : client.users.cache.has(args[0]) ? client.users.cache.get(args[0]) : message.author;
let name = !args.length ? message.member ? message.member.displayName : message.author.username : mention ? mention.username : client.users.cache.has(args[0]) ? client.users.cache.get(args[0]).username : message.author.username;
let options = new TagFilter([
new Tag(['small', 's', 'mini', 'm'], 'small', 'toggle'),
new Tag(['verysmall', 'vsmall', '-vs', 'xs'], 'vsmall', 'toggle')
]).test(args.join(" "));
try {
let avem = new Discord.MessageEmbed()
.setTitle(`${name.endsWith('s') ? `${name}'` : `${name}'s`} Avatar`)
.setImage(member.avatarURL({size: options.vsmall ? 128 : options.small ? 256 : 2048, dynamic: true}))
.setColor('c375f0')
.setFooter("Natsuki", client.user.avatarURL())
if (!options.vsmall) {avem.setTimestamp();}
return message.channel.send(avem);
} catch {return message.reply("Hmm, there seems to have been an error while I tried to show you that user's avatar.");}
}
const Discord = require('discord.js');
const {Tag} = require('../../util/tag');
const {TagFilter} = require('../../util/tagfilter');
module.exports = {
name: "avatar",
aliases: ['av', 'a', 'pfp'],
help: "Use `{{p}}avatar` to get your own profile picture, or mention someone to get theirs!",
meta: {
category: 'Misc',
description: "Flare your avatar or peek at others'",
syntax: '`avatar [@mention]`',
extra: null
},
async execute(message, msg, args, cmd, prefix, mention, client) {
let member = !args.length ? message.author : mention ? mention : client.users.cache.has(args[0]) ? client.users.cache.get(args[0]) : message.author;
let name = !args.length ? message.member ? message.member.displayName : message.author.username : mention ? mention.username : client.users.cache.has(args[0]) ? client.users.cache.get(args[0]).username : message.author.username;
let options = new TagFilter([
new Tag(['small', 's', 'mini', 'm'], 'small', 'toggle'),
new Tag(['verysmall', 'vsmall', '-vs', 'xs'], 'vsmall', 'toggle')
]).test(args.join(" "));
try {
let avem = new Discord.MessageEmbed()
.setTitle(`${name.endsWith('s') ? `${name}'` : `${name}'s`} Avatar`)
.setImage(member.avatarURL({size: options.vsmall ? 128 : options.small ? 256 : 2048, dynamic: true}))
.setColor('c375f0')
.setFooter("Natsuki", client.user.avatarURL())
if (!options.vsmall) {avem.setTimestamp();}
return message.channel.send(avem);
} catch {return message.reply("Hmm, there seems to have been an error while I tried to show you that user's avatar.");}
}
};

@ -1,73 +1,73 @@
const Discord = require("discord.js");
const {Pagination} = require('../util/pagination');
const ask = require('../util/ask');
module.exports = {
name: "help",
aliases: ["h", "commands", "cmds"],
help: 'you silly! What did you expect me to respond with?',
async execute(message, msg, args, cmd, prefix, mention, client) {
if (!args.length) {
let sorted = {};
await Array.from(client.commands.values()).forEach(command => {if (command.name !== "help" && command.meta) {
sorted[command.meta.category] = sorted[command.meta.category] ? sorted[command.meta.category] : {};
sorted[command.meta.category][command.name] = command;
}});
let helpSorted = {};
let category; for (category of Object.keys(sorted)) {
let categorySorted = [];
let current = 1;
let currentEmbed = new Discord.MessageEmbed().setAuthor("Help Menu", message.author.avatarURL()).setTitle(category).setDescription("React to control the menu! You can also specify a command name when doing the help command to get more info about it.").setColor("c375f0");
let commands = Object.keys(sorted[category]);
let command; for (command of commands) {
let aliases = '';
let a; if (sorted[category][command].aliases) {for (a of sorted[category][command].aliases) {aliases += `\`${a}\`, `}}
aliases = aliases.length ? aliases.slice(0, aliases.length - 2) : 'None';
currentEmbed.addField(`${command.slice(0,1).toUpperCase()}${command.slice(1)}`, `${sorted[category][command].meta.description}\n\nAliases: ${aliases}\nSyntax: ${sorted[category][command].meta.syntax}${sorted[category][command].meta.extra ? '\n\n' + sorted[category][command].meta.extra : ''}`);
current += 1;
if (current === 5) {
categorySorted.push(currentEmbed);
current = 1;
currentEmbed = new Discord.MessageEmbed().setAuthor("Help Menu", message.author.avatarURL()).setTitle(category).setDescription("React to control the menu! You can also specify a command name when doing the help command to get more info about it.").setColor("c375f0");
}
}
if (current > 1) {categorySorted.push(currentEmbed);}
helpSorted[category] = categorySorted;
}
let cat = await ask(message, "What would you like help with? (`Fun`|`Roleplay`|`Utility`|`Misc`|`Moderation`|`Social`|`Leveling`) or `all` if you'd like to browse all commands", 60000); if (!cat) {return;}
if (!['f', 'fun', 'rp', 'roleplay', 'dnd', 'role play', 'rpg', 'dice', 'u', 'util', 'utility', 'utilities', 'm', 'misc', 'miscellaneous', 'mod', 'moderation', 's', 'social', 'leveling', 'l', 'level', 'a', 'all'].includes(`${cat}`.trim().toLowerCase())) {return message.channel.send("That wasn't a valid response! Try again?");}
let pages;
if (['f', 'fun'].includes(`${cat}`.trim().toLowerCase())) {pages = helpSorted['Fun'];}
if (['roleplay', 'dnd', 'role play', 'rpg', 'dice'].includes(`${cat}`.trim().toLowerCase())) {pages = helpSorted['RP'];}
if (['u', 'util', 'utility', 'utilities'].includes(`${cat}`.trim().toLowerCase())) {pages = helpSorted['Utility'];}
if (['m', 'misc', 'miscellaneous'].includes(`${cat}`.trim().toLowerCase())) {pages = helpSorted['Misc'];}
if (['d', 'dev', 'developer'].includes(`${cat}`.trim().toLowerCase())) {pages = helpSorted['Developer'];}
if (['mod', 'moderation'].includes(`${cat}`.trim().toLowerCase())) {pages = helpSorted['Moderation'];}
if (['s', 'social'].includes(`${cat}`.trim().toLowerCase())) {pages = helpSorted['Social'];}
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);
if (pages.length > 1) {
let help = new Pagination(message.channel, pages, message, client, true);
return await help.start({endTime: 120000, user: message.author.id});
} else {return message.channel.send(pages[0].setFooter("Natsuki", client.user.avatarURL()).setTimestamp());}
} else {
let command;
if (client.commands.has(args[0])) {command = client.commands.get(args[0]);}
else if (client.aliases.has(args[0])) {command = client.commands.get(client.aliases.get(args[0]));}
else {return message.reply("I don't have that command! Try using `" + prefix + "help` to get a list of my commands");}
return message.reply(command.help
? command.help instanceof Discord.MessageEmbed
? command.help.setFooter("Natsuki | <required> [optional]", client.user.avatarURL()).setColor("c375f0").setTimestamp()
: command.help.replace(/{{p}}/g, prefix)
: "I don't seem to have any help info available for that command."
);
}
}
const Discord = require("discord.js");
const {Pagination} = require('../../util/pagination');
const ask = require('../../util/ask');
module.exports = {
name: "help",
aliases: ["h", "commands", "cmds"],
help: 'you silly! What did you expect me to respond with?',
async execute(message, msg, args, cmd, prefix, mention, client) {
if (!args.length) {
let sorted = {};
await Array.from(client.commands.values()).forEach(command => {if (command.name !== "help" && command.meta) {
sorted[command.meta.category] = sorted[command.meta.category] ? sorted[command.meta.category] : {};
sorted[command.meta.category][command.name] = command;
}});
let helpSorted = {};
let category; for (category of Object.keys(sorted)) {
let categorySorted = [];
let current = 1;
let currentEmbed = new Discord.MessageEmbed().setAuthor("Help Menu", message.author.avatarURL()).setTitle(category).setDescription("React to control the menu! You can also specify a command name when doing the help command to get more info about it.").setColor("c375f0");
let commands = Object.keys(sorted[category]);
let command; for (command of commands) {
let aliases = '';
let a; if (sorted[category][command].aliases) {for (a of sorted[category][command].aliases) {aliases += `\`${a}\`, `}}
aliases = aliases.length ? aliases.slice(0, aliases.length - 2) : 'None';
currentEmbed.addField(`${command.slice(0,1).toUpperCase()}${command.slice(1)}`, `${sorted[category][command].meta.description}\n\nAliases: ${aliases}\nSyntax: ${sorted[category][command].meta.syntax}${sorted[category][command].meta.extra ? '\n\n' + sorted[category][command].meta.extra : ''}`);
current += 1;
if (current === 5) {
categorySorted.push(currentEmbed);
current = 1;
currentEmbed = new Discord.MessageEmbed().setAuthor("Help Menu", message.author.avatarURL()).setTitle(category).setDescription("React to control the menu! You can also specify a command name when doing the help command to get more info about it.").setColor("c375f0");
}
}
if (current > 1) {categorySorted.push(currentEmbed);}
helpSorted[category] = categorySorted;
}
let cat = await ask(message, "What would you like help with? (`Fun`|`Roleplay`|`Utility`|`Misc`|`Moderation`|`Social`|`Leveling`) or `all` if you'd like to browse all commands", 60000); if (!cat) {return;}
if (!['f', 'fun', 'rp', 'roleplay', 'dnd', 'role play', 'rpg', 'dice', 'u', 'util', 'utility', 'utilities', 'm', 'misc', 'miscellaneous', 'mod', 'moderation', 's', 'social', 'leveling', 'l', 'level', 'a', 'all'].includes(`${cat}`.trim().toLowerCase())) {return message.channel.send("That wasn't a valid response! Try again?");}
let pages;
if (['f', 'fun'].includes(`${cat}`.trim().toLowerCase())) {pages = helpSorted['Fun'];}
if (['roleplay', 'dnd', 'role play', 'rpg', 'dice'].includes(`${cat}`.trim().toLowerCase())) {pages = helpSorted['RP'];}
if (['u', 'util', 'utility', 'utilities'].includes(`${cat}`.trim().toLowerCase())) {pages = helpSorted['Utility'];}
if (['m', 'misc', 'miscellaneous'].includes(`${cat}`.trim().toLowerCase())) {pages = helpSorted['Misc'];}
if (['d', 'dev', 'developer'].includes(`${cat}`.trim().toLowerCase())) {pages = helpSorted['Developer'];}
if (['mod', 'moderation'].includes(`${cat}`.trim().toLowerCase())) {pages = helpSorted['Moderation'];}
if (['s', 'social'].includes(`${cat}`.trim().toLowerCase())) {pages = helpSorted['Social'];}
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);
if (pages.length > 1) {
let help = new Pagination(message.channel, pages, message, client, true);
return await help.start({endTime: 120000, user: message.author.id});
} else {return message.channel.send(pages[0].setFooter("Natsuki", client.user.avatarURL()).setTimestamp());}
} else {
let command;
if (client.commands.has(args[0])) {command = client.commands.get(args[0]);}
else if (client.aliases.has(args[0])) {command = client.commands.get(client.aliases.get(args[0]));}
else {return message.reply("I don't have that command! Try using `" + prefix + "help` to get a list of my commands");}
return message.reply(command.help
? command.help instanceof Discord.MessageEmbed
? command.help.setFooter("Natsuki | <required> [optional]", client.user.avatarURL()).setColor("c375f0").setTimestamp()
: command.help.replace(/{{p}}/g, prefix)
: "I don't seem to have any help info available for that command."
);
}
}
};

@ -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,85 +1,85 @@
const Discord = require("discord.js");
const GuildData = require('../models/guild');
const LogData = require('../models/log');
const ObjLogTypes = {
mdelete: ['md', 'mdelete', 'messagedelete', 'deletemessage', 'deletemsg', 'msgdelete'],
medit: ['me', 'medit', 'messageedit', 'editmessage', 'msgedit', 'editmsg'],
chnew: ['chn', 'chc', 'newch', 'newchannel', 'chcreate', 'channelcreate'],
//chedit: ['channeledit'],
chdelete: ['chd', 'channeldelete', 'deletechannel', 'deletech', 'chdelete'],
//vcjoin: [],
//vcleave: [],
//servervcmute: [],
//servervcdeafen: [],
//kick: [],
//ban: [],
//mute: [],
//warn: [],
//giverole: [],
//takerole: [],
//addrole: [],
//editrole: [],
//deleterole: [],
//serverjoin: [],
//serverleave: [],
//nickname: [],
//username: [],
//avatar: []
}; const LogTypes = new Map();
let keys = Object.keys(ObjLogTypes);
let key; for (key of keys) {let vs = ObjLogTypes[key]; let v; for (v of vs) {LogTypes.set(v, key);}}
module.exports = {
name: "logs",
aliases: ["log", "l", "modlog", "modlogs"],
help: new Discord.MessageEmbed()
.setTitle("Help -> Server Logs")
.setDescription("Configure your server's log settings.\n\nLogs will update you on events in your server that have the potential to require moderator intervention, like someone deleting a hateful message before you can see it or a misbehaving moderator kicking/banning a member when they aren't supposed to.")
.addField("Syntax", "`log <set|list|view|clear> [logType] [#channel]`")
.addField("Notice", "You must be an admin or have the specified staff role in order to use this command."),
meta: {
category: 'Moderation',
description: "Configure your server's log settings, which allow mods to see potentially suspicious activity in the server.",
syntax: '`log <set|list|view|clear> [logType] [#channel]`',
extra: "**Please note** that this command is still in the works, and that not all log types are available. The currently existing ones have been thoroughly tested, though."
},
async execute(message, msg, args, cmd, prefix, mention, client) {
if (!message.guild) {return message.reply("This command is server-only!");}
let tg = await GuildData.findOne({gid: message.guild.id});
if ((!message.member.permissions.has("ADMINISTRATOR")) && (!tg || !tg.staffrole || !tg.staffrole.length || !message.member.roles.cache.has(tg.staffrole))) {return message.reply("You must be an administrator or have the specified staff role in this server in order to edit or view log settings.");}
if (!args.length) {return message.channel.send(`Syntax: \`${prefix}log <set|list|view|clear> [logType] [#channel]\``);}
if (['s', 'set'].includes(args[0].toLowerCase())) {
if (args.length < 3) {return message.channel.send(`You must specify the log type and the channel to send the log to. Use \`${prefix}log list\` to see a list of valid log types.`);}
if (!LogTypes.has(args[1].toLowerCase())) {return message.channel.send("That's not a valid log type. Use \`${prefix}log list\` to see a list of valid log types.");}
let lt = LogTypes.get(args[1].toLowerCase());
let ch = args[2].match(/<\#(?:\d+)>/m) && message.guild.channels.cache.has(message.mentions.channels.first().id) ? message.mentions.channels.first() : message.guild.channels.cache.has(args[2]) ? message.guild.channels.cache.get(args[2]) : null;
if (!ch) {return message.channel.send("I can't find that channel! Make sure that you've mentioned one, or that the ID you provided is correct, and that I can see it.");}
if (!ch.permissionsFor(client.user.id).has("SEND_MESSAGES")) {return message.reply("I don't have permissions to send messages in that channel. Please give me access and try again.");}
let tl = await LogData.findOne({gid: message.guild.id}) || new LogData({gid: message.guild.id});
tl[lt] = ch.id;
tl.save();
if (!client.guildconfig.logs.has(message.guild.id)) {client.guildconfig.logs.set(message.guild.id, new Map());}
client.guildconfig.logs.get(message.guild.id).set(lt, ch.id);
return message.channel.send("Log settings updated!")
}
if (['l', 'list'].includes(args[0].toLowerCase())) {
return message.channel.send("Valid log types:\n\n-`msgdelete` - Shows the content of a message that was deleted, in any channel.\n-`msgedit` - Shows both the old and new versions of a message when it is edited.");
}
if (['v', 'view'].includes(args[0].toLowerCase())) {
if (client.guildconfig.logs.has(message.guild.id) && client.guildconfig.logs.get(message.guild.id).size) {return message.channel.send(`This server's logs: \n\n${function bonk(){let s = ''; Array.from(client.guildconfig.logs.get(message.guild.id).keys()).forEach(v => s+=`\`${v}\`: <#${client.guildconfig.logs.get(message.guild.id).get(v)}>, `); return s;}().slice(0, -2)}`);}
else {return message.channel.send("Your server doesn't have any logs set up at the moment, or they aren't cached. If you keep seeing this issue even after setting logs, please contact my developers!");}
}
if (['c', 'clear'].includes(args[0].toLowerCase())) {
}
}
const Discord = require("discord.js");
const GuildData = require('../../models/guild');
const LogData = require('../../models/log');
const ObjLogTypes = {
mdelete: ['md', 'mdelete', 'messagedelete', 'deletemessage', 'deletemsg', 'msgdelete'],
medit: ['me', 'medit', 'messageedit', 'editmessage', 'msgedit', 'editmsg'],
chnew: ['chn', 'chc', 'newch', 'newchannel', 'chcreate', 'channelcreate'],
//chedit: ['channeledit'],
chdelete: ['chd', 'channeldelete', 'deletechannel', 'deletech', 'chdelete'],
//vcjoin: [],
//vcleave: [],
//servervcmute: [],
//servervcdeafen: [],
//kick: [],
//ban: [],
//mute: [],
//warn: [],
//giverole: [],
//takerole: [],
//addrole: [],
//editrole: [],
//deleterole: [],
//serverjoin: [],
//serverleave: [],
//nickname: [],
//username: [],
//avatar: []
}; const LogTypes = new Map();
let keys = Object.keys(ObjLogTypes);
let key; for (key of keys) {let vs = ObjLogTypes[key]; let v; for (v of vs) {LogTypes.set(v, key);}}
module.exports = {
name: "logs",
aliases: ["log", "l", "modlog", "modlogs"],
help: new Discord.MessageEmbed()
.setTitle("Help -> Server Logs")
.setDescription("Configure your server's log settings.\n\nLogs will update you on events in your server that have the potential to require moderator intervention, like someone deleting a hateful message before you can see it or a misbehaving moderator kicking/banning a member when they aren't supposed to.")
.addField("Syntax", "`log <set|list|view|clear> [logType] [#channel]`")
.addField("Notice", "You must be an admin or have the specified staff role in order to use this command."),
meta: {
category: 'Moderation',
description: "Configure your server's log settings, which allow mods to see potentially suspicious activity in the server.",
syntax: '`log <set|list|view|clear> [logType] [#channel]`',
extra: "**Please note** that this command is still in the works, and that not all log types are available. The currently existing ones have been thoroughly tested, though."
},
async execute(message, msg, args, cmd, prefix, mention, client) {
if (!message.guild) {return message.reply("This command is server-only!");}
let tg = await GuildData.findOne({gid: message.guild.id});
if ((!message.member.permissions.has("ADMINISTRATOR")) && (!tg || !tg.staffrole || !tg.staffrole.length || !message.member.roles.cache.has(tg.staffrole))) {return message.reply("You must be an administrator or have the specified staff role in this server in order to edit or view log settings.");}
if (!args.length) {return message.channel.send(`Syntax: \`${prefix}log <set|list|view|clear> [logType] [#channel]\``);}
if (['s', 'set'].includes(args[0].toLowerCase())) {
if (args.length < 3) {return message.channel.send(`You must specify the log type and the channel to send the log to. Use \`${prefix}log list\` to see a list of valid log types.`);}
if (!LogTypes.has(args[1].toLowerCase())) {return message.channel.send("That's not a valid log type. Use \`${prefix}log list\` to see a list of valid log types.");}
let lt = LogTypes.get(args[1].toLowerCase());
let ch = args[2].match(/<\#(?:\d+)>/m) && message.guild.channels.cache.has(message.mentions.channels.first().id) ? message.mentions.channels.first() : message.guild.channels.cache.has(args[2]) ? message.guild.channels.cache.get(args[2]) : null;
if (!ch) {return message.channel.send("I can't find that channel! Make sure that you've mentioned one, or that the ID you provided is correct, and that I can see it.");}
if (!ch.permissionsFor(client.user.id).has("SEND_MESSAGES")) {return message.reply("I don't have permissions to send messages in that channel. Please give me access and try again.");}
let tl = await LogData.findOne({gid: message.guild.id}) || new LogData({gid: message.guild.id});
tl[lt] = ch.id;
tl.save();
if (!client.guildconfig.logs.has(message.guild.id)) {client.guildconfig.logs.set(message.guild.id, new Map());}
client.guildconfig.logs.get(message.guild.id).set(lt, ch.id);
return message.channel.send("Log settings updated!")
}
if (['l', 'list'].includes(args[0].toLowerCase())) {
return message.channel.send("Valid log types:\n\n-`msgdelete` - Shows the content of a message that was deleted, in any channel.\n-`msgedit` - Shows both the old and new versions of a message when it is edited.");
}
if (['v', 'view'].includes(args[0].toLowerCase())) {
if (client.guildconfig.logs.has(message.guild.id) && client.guildconfig.logs.get(message.guild.id).size) {return message.channel.send(`This server's logs: \n\n${function bonk(){let s = ''; Array.from(client.guildconfig.logs.get(message.guild.id).keys()).forEach(v => s+=`\`${v}\`: <#${client.guildconfig.logs.get(message.guild.id).get(v)}>, `); return s;}().slice(0, -2)}`);}
else {return message.channel.send("Your server doesn't have any logs set up at the moment, or they aren't cached. If you keep seeing this issue even after setting logs, please contact my developers!");}
}
if (['c', 'clear'].includes(args[0].toLowerCase())) {
}
}
};

@ -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,27 +1,27 @@
const Discord = require('discord.js');
const GuildSettings = require('../models/guild');
module.exports = {
name: "togglestatuses",
aliases: ['ts', 'tsw', 'togglestatuswarnings', 'togglestatus', 'statustoggle', 'statusestoggle'],
help: new Discord.MessageEmbed()
.setTitle("Help -> Server Status-Toggling")
.setDescription("Disables or enables the warning that appears when you ping someone that has a status set.")
.addField("Syntax", "`togglestatuses [c]` (add `c` to the end of the message if you want to check if they're enabled or not.)"),
meta: {
category: 'Moderation',
description: "Toggle the warning I give members when they ping someone with a status. Some people find it annoying, but here's my mute button!",
syntax: '`togglestatuses [-c]`',
extra: null
},
async execute(message, msg, args, cmd, prefix, mention, client) {
if (!message.guild) {return message.reply('You must be in a server to use this command.');}
let tg = await GuildSettings.findOne({gid: message.guild.id});
if (!message.member.permissions.has('ADMINISTRATOR') && (tg && tg.staffrole.length && !message.member.roles.cache.has(tg.staffrole))) {return message.reply("You don't have permissions to use this command in your server.");}
if (args[0] && ['c', 'check', 'v', 'view'].includes(args[0].toLowerCase())) {return message.channel.send(`I ${tg && !tg.nostatus ? 'will' : 'will not'} send a warning when pinging a member with a status.`);}
if (!tg) {tg = new GuildSettings({gid: message.guild.id});}
tg.nostatus = !tg.nostatus;
tg.save();
return message.channel.send(`I ${!tg.nostatus ? 'will' : 'will not'} send a warning when pinging a member with a status.`);
}
const Discord = require('discord.js');
const GuildSettings = require('../../models/guild');
module.exports = {
name: "togglestatuses",
aliases: ['ts', 'tsw', 'togglestatuswarnings', 'togglestatus', 'statustoggle', 'statusestoggle'],
help: new Discord.MessageEmbed()
.setTitle("Help -> Server Status-Toggling")
.setDescription("Disables or enables the warning that appears when you ping someone that has a status set.")
.addField("Syntax", "`togglestatuses [c]` (add `c` to the end of the message if you want to check if they're enabled or not.)"),
meta: {
category: 'Moderation',
description: "Toggle the warning I give members when they ping someone with a status. Some people find it annoying, but here's my mute button!",
syntax: '`togglestatuses [-c]`',
extra: null
},
async execute(message, msg, args, cmd, prefix, mention, client) {
if (!message.guild) {return message.reply('You must be in a server to use this command.');}
let tg = await GuildSettings.findOne({gid: message.guild.id});
if (!message.member.permissions.has('ADMINISTRATOR') && (tg && tg.staffrole.length && !message.member.roles.cache.has(tg.staffrole))) {return message.reply("You don't have permissions to use this command in your server.");}
if (args[0] && ['c', 'check', 'v', 'view'].includes(args[0].toLowerCase())) {return message.channel.send(`I ${tg && !tg.nostatus ? 'will' : 'will not'} send a warning when pinging a member with a status.`);}
if (!tg) {tg = new GuildSettings({gid: message.guild.id});}
tg.nostatus = !tg.nostatus;
tg.save();
return message.channel.send(`I ${!tg.nostatus ? 'will' : 'will not'} send a warning when pinging a member with a status.`);
}
};

@ -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