commit d3ccdffbd94028568366349f13f3ed95d52d8cb1
parent 3de5418cf1554c18551d7256681c9c2f7d54945a
Author: night0721 <[email protected]>
Date: Tue, 21 Sep 2021 07:51:56 +0800
global starboard, esnipe snipe fix
Diffstat:
50 files changed, 1158 insertions(+), 1124 deletions(-)
diff --git a/bot.js b/bot.js
@@ -1,9 +1,8 @@
-const { Client, Collection, MessageEmbed, Intents } = require("discord.js");
-const { GiveawaysManager } = require("discord-giveaways");
-const config = require("./config.json");
+const { MessageEmbed, Intents } = require("discord.js");
+const Cath = require("./client/Cath");
const version = require("./package.json").version;
-require("dotenv").config();
-const client = new Client({
+const config = require("./config.json");
+const client = new Cath({
allowedMentions: { parse: ["users", "roles"], repliedUser: true },
presence: {
activities: [
@@ -17,8 +16,9 @@ const client = new Client({
restTimeOffset: 0,
partials: ["MESSAGE", "CHANNEL", "REACTION", "GUILD_MEMBER"],
intents: [
- Intents.FLAGS.GUILDS,
//Intents.FLAGS.GUILD_MEMBERS,
+ //Intents.FLAGS.GUILD_PRESENCES,
+ Intents.FLAGS.GUILDS,
Intents.FLAGS.GUILD_BANS,
Intents.FLAGS.GUILD_EMOJIS_AND_STICKERS,
Intents.FLAGS.GUILD_INVITES,
@@ -26,68 +26,13 @@ const client = new Client({
Intents.FLAGS.GUILD_MESSAGES,
Intents.FLAGS.GUILD_MESSAGE_REACTIONS,
Intents.FLAGS.DIRECT_MESSAGES,
- //Intents.FLAGS.GUILD_PRESENCES,
+ Intents.FLAGS.DIRECT_MESSAGE_TYPING,
],
});
module.exports = client;
require("./util/functions/economy")(client);
require("./util/dist/manager")(client);
require("./util/dist/handler")(client);
-client.commands = new Collection();
-client.slashCommands = new Collection();
-client.aliases = new Collection();
-client.esnipes = new Collection();
-client.hide = new Collection();
-client.snipes = new Array();
-client.queue = new Map();
-client.Timers = new Map();
-client.config = config;
-client.function = require("./util/functions/function");
-client.data = require("./util/functions/mongoose");
-client.err = require("./util/dist/err");
-client.serr = require("./util/dist/slash");
-client.cat = client.config.ca;
-client.SuggestionLog = client.config.Suggestion;
-client.ReportLog = client.config.Report;
-client.DMLog = client.config.DMLog;
-client.CMDLog = client.config.CMDLog;
-client.ServerLog = client.config.ServerLog;
-client.ErrorLog = client.config.ErrorLog;
-client.color = client.config.color;
-client.author = "Cath Team";
-client.invite = "https://discord.gg/SbQHChmGcp";
-client.web = client.config.URL;
-client.data
- .connect(process.env.MONGO)
- .then(() => console.log("Connected to MongoDB!"))
- .catch(e => console.log(e));
-client.owners = [
- "452076196419600394", //Night
- "766645910087139338", //chekseaa
- "755476040029306952", //Kałÿ
- "534027706325532694", //Cat drinking a cat
- "381442059111759883", //Thunder
- "556808365574193194", //chunchunmaru
-];
-client.currency = "<:cp:840231933933387797>";
-client.path = [
- "614423108388126731",
- "767173194943168542",
- "783633408738721834",
- "718762019586572341",
- "784052348561522730",
- "840225563193114624",
- "800396461229080619",
-];
-client.giveaways = new GiveawaysManager(client, {
- storage: "./util/Data/giveaways.json",
- updateCountdownEvery: 1000,
- default: {
- botsCanWin: false,
- embedColor: client.color,
- reaction: "🎉",
- },
-});
process.on("unhandledRejection", async err => {
if (client.user) {
if (client.user.id === client.user.id) {
@@ -100,6 +45,6 @@ process.on("unhandledRejection", async err => {
client.channels.cache.get(client.ErrorLog).send({ embeds: [embed] });
}
}
- return console.log(err);
+ return console.error(err);
});
-client.login(process.env.TOKEN);
+client.start();
diff --git a/client/Cath.js b/client/Cath.js
@@ -0,0 +1,72 @@
+const { Client, Collection } = require("discord.js");
+const config = require("../config.json");
+const { GiveawaysManager } = require("discord-giveaways");
+require("dotenv").config();
+class Cath extends Client {
+ /**
+ * @param {Client.options} options
+ */
+ constructor(options = {}) {
+ super(options);
+ this.commands = new Collection();
+ this.slashCommands = new Collection();
+ this.aliases = new Collection();
+ this.esnipes = new Collection();
+ this.hide = new Collection();
+ this.snipes = new Collection();
+ this.queue = new Map();
+ this.Timers = new Map();
+ this.config = config;
+ this.function = require("../util/functions/function");
+ this.data = require("../util/functions/mongoose");
+ this.err = require("../util/dist/err");
+ this.serr = require("../util/dist/slash");
+ this.cat = this.config.ca;
+ this.SuggestionLog = this.config.Suggestion;
+ this.ReportLog = this.config.Report;
+ this.DMLog = this.config.DMLog;
+ this.CMDLog = this.config.CMDLog;
+ this.ServerLog = this.config.ServerLog;
+ this.ErrorLog = this.config.ErrorLog;
+ this.color = this.config.color;
+ this.author = "Cath Team";
+ this.invite = "https://discord.gg/SbQHChmGcp";
+ this.web = this.config.URL;
+ this.owners = [
+ "452076196419600394", //Night
+ "766645910087139338", //chekseaa
+ "755476040029306952", //Kałÿ
+ "534027706325532694", //Cat drinking a cat
+ "381442059111759883", //Thunder
+ "556808365574193194", //chunchunmaru
+ ];
+ this.currency = "<:cp:840231933933387797>";
+ this.path = [
+ "614423108388126731",
+ "767173194943168542",
+ "783633408738721834",
+ "718762019586572341",
+ "784052348561522730",
+ "840225563193114624",
+ "800396461229080619",
+ ];
+ this.giveaways = new GiveawaysManager(this, {
+ storage: "./util/Data/giveaways.json",
+ updateCountdownEvery: 1000,
+ default: {
+ botsCanWin: false,
+ embedColor: this.color,
+ reaction: "🎉",
+ },
+ });
+ }
+ start() {
+ this.data
+ .connect(process.env.MONGO)
+ .then(() => console.log("Connected to MongoDB!"))
+ .catch(e => console.log(e));
+ this.login(process.env.TOKEN);
+ }
+}
+
+module.exports = Cath;
diff --git a/client/StarboardClient.js b/client/StarboardClient.js
@@ -0,0 +1,6 @@
+const { StarboardClient } = require("cath");
+const client = require("../bot");
+module.exports = new StarboardClient({
+ client,
+ color: "02023a",
+});
diff --git a/command/Config/premium.js b/command/Config/premium.js
@@ -0,0 +1,119 @@
+const { MessageEmbed } = require("discord.js");
+module.exports = {
+ name: "premiumserver",
+ category: "Config",
+ description: "Add premium to a server",
+ Premium: true,
+ options: [
+ {
+ type: 5,
+ name: "choice",
+ description: "Whether add or remove premium server",
+ required: true,
+ },
+ ],
+ run: async (client, interaction, args) => {
+ try {
+ console.log(interaction.options.getBoolean("choice"));
+ const user = await client.data.getUser(interaction.user.id);
+ const guild = await client.data.getGuild(interaction.guild.id);
+ if (interaction.options.getBoolean("choice") == true) {
+ if (guild.Premium == true) {
+ return client.serr(interaction, "Config", "premium", 506);
+ }
+ if (
+ (user.Tier == 1 && user.PremiumServers.length >= 5) ||
+ (user.Tier == 2 && user.PremiumServers.length >= 2) ||
+ (user.Tier == 3 && user.PremiumServers.length >= 0)
+ ) {
+ return client.serr(interaction, "Config", "premium", 505);
+ } else {
+ await client.data.setPremium(interaction.guild.id, "true");
+ await client.data.pushGuild(
+ interaction.user.id,
+ interaction.guild.id,
+ "push"
+ );
+ interaction.followUp({
+ embeds: [
+ new MessageEmbed()
+ .setTitle("Success!")
+ .setDescription(
+ `Premium added to **${interaction.guild.name}**! \n`
+ )
+ .setFooter("Thank you for supporting Cath!")
+ .setColor("GREEN")
+ .setTimestamp()
+ .setAuthor(
+ interaction.user.tag,
+ interaction.user.displayAvatarURL({ dynamic: true })
+ ),
+ ],
+ });
+ client.channels.cache.get(client.ServerLog).send({
+ embeds: [
+ new MessageEmbed()
+ .setTitle("New Premium Server")
+ .addField(
+ "Server Info",
+ `**>Server Name**: \n${interaction.guild.name}
+ **>Server ID**: \n${interaction.guild.id}
+ **>Server Member Count**: \n${interaction.guild.memberCount}`
+ )
+ .setTimestamp()
+ .setThumbnail(interaction.guild.iconURL({ dynamic: true }))
+ .setColor("GREEN"),
+ ],
+ });
+ }
+ } else {
+ if (guild.Premium == false) {
+ return client.serr(interaction, "Config", "premium", 507);
+ }
+ if (!user.PremiumServers.includes(interaction.guild.id))
+ return client.serr(interaction, "Config", "premium", 509);
+ else {
+ await client.data.setPremium(interaction.guild.id, "false");
+ await client.data.pushGuild(
+ interaction.user.id,
+ interaction.guild.id,
+ "splice"
+ );
+ interaction.followUp({
+ embeds: [
+ new MessageEmbed()
+ .setTitle("Removed!")
+ .setDescription(
+ `Premium removed from **${interaction.guild.name}**! \n`
+ )
+ .setColor("RED")
+ .setTimestamp()
+ .setAuthor(
+ interaction.user.tag,
+ interaction.user.displayAvatarURL({ dynamic: true })
+ ),
+ ],
+ });
+ client.channels.cache.get(client.ServerLog).send({
+ embeds: [
+ new MessageEmbed()
+ .setTitle("Premium Server Removed")
+ .addField(
+ "Server Info",
+ `**>Server Name**: \n${interaction.guild.name}
+ **>Server ID**: \n${interaction.guild.id}
+ **>Server Member Count**: \n${interaction.guild.memberCount}`
+ )
+ .setTimestamp()
+ .setThumbnail(interaction.guild.iconURL({ dynamic: true }))
+ .setColor("RED"),
+ ],
+ });
+ }
+ }
+ } catch (e) {
+ console.log(e);
+ return client.serr(interaction, "Config", "premium", 999);
+ }
+ },
+};
diff --git a/command/Config/set.js b/command/Config/set.js
@@ -0,0 +1,220 @@
+const starboardClient = require("../../client/StarboardClient");
+module.exports = {
+ name: "set",
+ description: "Configure settings for the server",
+ UserPerms: ["ADMINISTRATOR"],
+ category: "Config",
+ options: [
+ {
+ type: 1,
+ name: "muterole",
+ description: "Set mute role for the server",
+ options: [
+ {
+ type: 8,
+ name: "role",
+ description: "The role for muted users",
+ required: true,
+ },
+ ],
+ },
+ {
+ type: 1,
+ name: "prefix",
+ description: "Set prefix for the server",
+ options: [
+ {
+ type: 3,
+ name: "prefix",
+ description: "The prefix for the server",
+ required: true,
+ choices: [],
+ },
+ ],
+ },
+ {
+ type: 1,
+ name: "welcome",
+ description: "Set welcome channel for the server",
+ options: [
+ {
+ type: 7,
+ name: "channel",
+ description: "The channel for welcome messages",
+ required: true,
+ },
+ ],
+ },
+ {
+ type: 1,
+ name: "goodbye",
+ description: "Set goodbye channel for the server",
+ options: [
+ {
+ type: 7,
+ name: "channel",
+ description: "The channel for goodbye messages",
+ required: true,
+ },
+ ],
+ },
+ {
+ type: 1,
+ name: "starboard",
+ description: "Set starboard channel for the server",
+ options: [
+ {
+ type: 7,
+ name: "channel",
+ description: "The channel for starboard messages",
+ required: true,
+ },
+ {
+ type: 4,
+ name: "starcount",
+ description: "The required amount of star to trigger the starboard",
+ required: true,
+ },
+ ],
+ },
+ {
+ type: 1,
+ name: "chatbot",
+ description: "Set chatbot channel for the server",
+ options: [
+ {
+ type: 7,
+ name: "channel",
+ description: "The channel for chatbot messages",
+ required: true,
+ },
+ ],
+ },
+ {
+ type: 1,
+ name: "log",
+ description: "Set log channel for the server",
+ options: [
+ {
+ type: 7,
+ name: "channel",
+ description: "The channel for log messages",
+ required: true,
+ },
+ ],
+ },
+ {
+ type: 1,
+ name: "level",
+ description: "Set whether level system is activated for the server",
+ options: [
+ {
+ type: 5,
+ name: "choice",
+ description: "whether level system is activated for the server",
+ required: true,
+ },
+ ],
+ },
+ ],
+ run: async (client, interaction, args) => {
+ if (args[0].toLowerCase() === "muterole") {
+ const role = interaction.guild.roles.cache.get(args[1]);
+ if (role.managed) {
+ interaction.followUp({ content: "You must provide a non bot role" });
+ } else {
+ await client.data.setMuterole(interaction.guild.id, args[1]);
+ interaction.followUp({
+ content: `Saved **${role.name}** as the mute role`,
+ });
+ }
+ } else if (args[0].toLowerCase() === "prefix") {
+ await client.data.setPrefix(interaction.guild.id, args[1]);
+ interaction.followUp({ content: `Saved \`${args[1]}\` as the prefix` });
+ } else if (args[0].toLowerCase() === "welcome") {
+ const channel = interaction.guild.channels.cache.get(args[1]);
+ if (channel.type !== "GUILD_TEXT")
+ interaction.followUp({ content: "Please provide a text channel" });
+ else {
+ await client.data.setWelcome(interaction.guild.id, args[1]);
+ interaction.followUp({
+ content: `Saved **${channel}** as the welcome channel`,
+ });
+ }
+ } else if (args[0].toLowerCase() === "goodbye") {
+ const channel = interaction.guild.channels.cache.get(args[1]);
+ if (channel.type !== "GUILD_TEXT")
+ interaction.followUp({ content: "Please provide a text channel" });
+ else {
+ await client.data.setGoodbye(interaction.guild.id, args[1]);
+ interaction.followUp({
+ content: `Saved **${channel}** as the goodbye channel`,
+ });
+ }
+ } else if (args[0].toLowerCase() === "starboard") {
+ const channel = interaction.guild.channels.cache.get(args[1]);
+ if (channel.type !== "GUILD_TEXT")
+ interaction.followUp({ content: "Please provide a text channel" });
+ else {
+ starboardClient.config.guilds.add({
+ id: interaction.guild.id,
+ options: {
+ starCount: args[2],
+ starboardChannel: args[1],
+ },
+ });
+ await client.data.setStarboard(interaction.guild.id, args[1], args[2]);
+ interaction.followUp({
+ content: `Saved **${channel}** as the starboard channel`,
+ });
+ }
+ } else if (args[0].toLowerCase() === "chatbot") {
+ const channel = interaction.guild.channels.cache.get(args[1]);
+ if (channel.type !== "GUILD_TEXT")
+ interaction.followUp({ content: "Please provide a text channel" });
+ else {
+ await client.data.setChatbot(interaction.guild.id, args[1]);
+ interaction.followUp({
+ content: `Saved **${channel}** as the chatbot channel`,
+ });
+ }
+ } else if (args[0].toLowerCase() === "log") {
+ const channel = interaction.guild.channels.cache.get(args[1]);
+ if (channel.type !== "GUILD_TEXT")
+ interaction.followUp({ content: "Please provide a text channel" });
+ else {
+ let webhookid;
+ let webhooktoken;
+ await channel
+ .createWebhook(interaction.guild.name, {
+ avatar: interaction.guild.iconURL({ format: "png" }),
+ })
+ .then(webhook => {
+ webhookid = webhook.id;
+ webhooktoken = webhook.token;
+ });
+ await client.data.setLog(
+ interaction.guild.id,
+ channel.id,
+ webhookid,
+ webhooktoken
+ );
+ interaction.followUp({
+ content: `Saved **${channel}** as the log channel`,
+ });
+ }
+ } else if (args[0].toLowerCase() === "level") {
+ if (args[1]) {
+ await client.data.setGLevel(interaction.guild.id, "true");
+ interaction.followUp({
+ content: `Levelling is enabled in this server now.`,
+ });
+ } else {
+ await client.data.setGLevel(interaction.guild.id, "false");
+ interaction.followUp({
+ content: `Levelling is disabled in this server now.`,
+ });
+ }
+ }
+ },
+};
diff --git a/command/Economy/drop.js b/command/Economy/drop.js
@@ -0,0 +1,44 @@
+module.exports = {
+ name: "drop",
+ usage: "{Channel} (Number)",
+ description: "Drops money to a channel",
+ category: "Economy",
+ options: [
+ {
+ type: 7,
+ name: "channel",
+ description: "The channel you want to drop",
+ required: true,
+ },
+ {
+ type: 4,
+ name: "cp",
+ description: "The amount of CP to drop",
+ required: true,
+ },
+ ],
+ run: async (client, interaction, args) => {
+ const channel = interaction.guild.channels.cache.get(args[0]);
+ const coinsAmount = args[1];
+ if ((await client.bal(interaction.user.id)) < coinsAmount) {
+ return client.serr(interaction, "Economy", "drop", 20);
+ }
+ const filter = msg =>
+ msg.guild.id === interaction.guild.id && msg.content === `claim`;
+ interaction.followUp({
+ content: "The drop has started in " + channel.toString(),
+ });
+ channel.send({
+ content: `${interaction.user.username} has dropped a ${client.currency} bomb! Type \`claim\` to claim ${client.currency}!!`,
+ });
+ client.rmv(interaction.user.id, parseInt(coinsAmount));
+ channel.awaitMessages({ filter, max: 1, time: 60000 }).then(async msg => {
+ const id = msg.first().author.id;
+ const coinsToClaim = parseInt(coinsAmount);
+ await client.add(id, coinsToClaim, interaction);
+ msg.first().reply({
+ content: `Congratultions! You have claimed **${coinsToClaim}** ${client.currency}!`,
+ });
+ });
+ },
+};
diff --git a/command/Information/help.js b/command/Information/help.js
@@ -129,12 +129,12 @@ module.exports = {
content: `There isn't any command or category named "${args[0]}"`,
});
} else {
- if (command.UserPerm && Array.isArray(command.UserPerm)) {
- UserPermissions = command.UserPerm;
- } else UserPermissions = [command.UserPerm ? command.UserPerm : ""];
- if (command.BotPerm && Array.isArray(command.BotPerm)) {
- BotPermissions = command.BotPerm;
- } else BotPermissions = [command.BotPerm ? command.BotPerm : ""];
+ if (command.UserPerms && Array.isArray(command.UserPerms)) {
+ UserPermissions = command.UserPerms;
+ } else UserPermissions = [command.UserPerms ? command.UserPerms : ""];
+ if (command.BotPerms && Array.isArray(command.BotPerms)) {
+ BotPermissions = command.BotPerms;
+ } else BotPermissions = [command.BotPerms ? command.BotPerms : ""];
const BotPerms = BotPermissions.map(x =>
x
.split("_")
@@ -164,7 +164,7 @@ module.exports = {
if (command.timeout) {
embed.addField("**Cooldown**:", utils.timer(command.timeout));
}
- if (command.UserPerm) {
+ if (command.UserPerms) {
embed.addField("**Required User Permission**:", UserPerms);
}
if (command.BotPerm) {
diff --git a/command/Moderation/announce.js b/command/Moderation/announce.js
@@ -0,0 +1,60 @@
+const { MessageEmbed } = require("discord.js");
+module.exports = {
+ name: "announce",
+ UserPerm: ["MANAGE_MESSAGES"],
+ BotPerm: ["MANAGE_MESSAGES"],
+ usage: "{Channel} (Message)",
+ description: "Announce a message to a channel.",
+ category: "Moderation",
+ options: [
+ {
+ type: 7,
+ name: "channel",
+ description: "The channel to announce",
+ required: true,
+ },
+ {
+ type: 3,
+ name: "message",
+ description: "The message to announce",
+ required: true,
+ },
+ ],
+ run: async (client, interaction, args) => {
+ const channel = interaction.guild.channels.cache.get(args[0]);
+ if (channel.type !== "GUILD_TEXT") {
+ return interaction.followUp({
+ content: "Please provide a text channel",
+ });
+ }
+ try {
+ channel.send({
+ embeds: [
+ new MessageEmbed()
+ .setAuthor(
+ `Sent by ${interaction.member.displayName}`,
+ interaction.user.displayAvatarURL({ dynamic: true })
+ )
+ .setDescription(args[1])
+ .setTimestamp()
+ .setColor(client.color),
+ ],
+ });
+ interaction.followUp({
+ embeds: [
+ new MessageEmbed()
+ .setTitle(`Message Announced`)
+ .addField("**Moderator**", interaction.user.tag, true)
+ .setTimestamp()
+ .setFooter(
+ interaction.member.displayName,
+ interaction.user.displayAvatarURL({ dynamic: true })
+ )
+ .setColor(client.color),
+ ],
+ });
+ } catch (e) {
+ console.log(e);
+ }
+ },
+};
diff --git a/command/Moderation/purge.js b/command/Moderation/purge.js
@@ -5,13 +5,13 @@ module.exports = {
description: "Clear messages in a specific channel",
options: [
{
- name: "channel",
+ name: 7,
description: "Channel where the messages to be deleted",
type: "CHANNEL",
required: true,
},
{
- name: "amount",
+ name: 4,
description: "Amount of message in range of 1-100 to be deleted",
type: "NUMBER",
required: true,
@@ -30,7 +30,7 @@ module.exports = {
}
if (channel.type !== "GUILD_TEXT") {
return interaction.followUp({
- content: "Please provide a text channel instead of voice or category",
+ content: "Please provide a text channel",
});
}
const limit = await interaction.channel.messages.fetch({
diff --git a/command/Moderation/slowmode.js b/command/Moderation/slowmode.js
@@ -1,7 +1,7 @@
const Discord = require("discord.js");
module.exports = {
name: "slowmode",
- UserPerm: "MANAGE_CHANNELS",
+ UserPerms: ["MANAGE_CHANNELS"],
description: "Set slowmode at a specific channel",
BotPerm: "MANAGE_CHANNELS",
usage: "(Time)",
diff --git a/command/Owner/blacklist.js b/command/Owner/blacklist.js
@@ -0,0 +1,43 @@
+module.exports = {
+ name: "blacklist",
+ category: "Owner",
+ usage: "(User) (Toggle) (Reason)",
+ description: "Blacklist someone from the bot",
+ Owner: true,
+ options: [
+ {
+ type: 6,
+ name: "user",
+ description: "The user to blacklist/whitelist",
+ required: true,
+ },
+ {
+ type: 5,
+ name: "yesno",
+ description: "Whether blacklist or whitelist",
+ required: true,
+ },
+ {
+ type: 3,
+ name: "reason",
+ description: "The reason to blacklist",
+ required: true,
+ },
+ ],
+ run: async (client, interaction, args) => {
+ let user = interaction.options.getUser("user");
+ toggle = interaction.options.getBoolean("yesno");
+ reason = interaction.options.getString("reason");
+ if (toggle === true) {
+ await client.data.BK(user.id, toggle, reason);
+ interaction.followUp({
+ content: `**Blacklisted** ${user.username}.\n**Reason: **${reason}`,
+ });
+ } else {
+ await client.data.BK(user.id, toggle, reason);
+ interaction.followUp({
+ content: `Removed blacklist from ${user.username}`,
+ });
+ }
+ },
+};
diff --git a/command/Utilities/emojiadd.js b/command/Utilities/emojiadd.js
@@ -0,0 +1,34 @@
+module.exports = {
+ name: "emojiadd",
+ usage: "(Link) (Name)",
+ description: "Show an emoji URL or add the emoji to the server",
+ category: "Utilities",
+ UserPerm: ["MANAGE_EMOJIS_AND_STICKERS"],
+ BotPerm: ["MANAGE_EMOJIS_AND_STICKERS"],
+ options: [
+ {
+ type: 3,
+ name: "link",
+ description: "The link you want to add",
+ required: true,
+ },
+ {
+ type: 3,
+ name: "name",
+ description: "The emoji name you want to add",
+ required: true,
+ },
+ ],
+ run: async (client, interaction, args) => {
+ try {
+ if (args[1].length < 2 || args[1].match(/\W/))
+ return client.serr(interaction, "Utilities", "emojiadd", 49);
+ interaction.guild.emojis.create(args[0], args[1]).then(msg => {
+ const em = interaction.guild.emojis.cache.find(a => a.name == args[1]);
+ interaction.followUp(`Added <:${em.name}:${em.id}> to the server`);
+ });
+ } catch (e) {
+ console.log(e);
+ }
+ },
+};
diff --git a/command/Utilities/esnipe.js b/command/Utilities/esnipe.js
@@ -0,0 +1,129 @@
+const { MessageEmbed } = require("discord.js");
+const moment = require("moment");
+module.exports = {
+ name: "editsnipe",
+ description: "Snipes a edited message",
+ category: "Utilities",
+ options: [
+ {
+ type: 7,
+ name: "channel",
+ description: "The sniped channel",
+ required: true,
+ },
+ {
+ type: 4,
+ name: "message",
+ description: "The sniped message",
+ required: false,
+ },
+ ],
+ run: async (client, interaction, args) => {
+ var i = 0;
+ var description = "";
+ const embed = new MessageEmbed()
+ .setAuthor(
+ `Sniped by ${interaction.user.tag}`,
+ interaction.user.displayAvatarURL({ dynamic: true })
+ )
+ .setColor(client.color)
+ .setFooter(`Made by ${client.author}`)
+ .setTimestamp()
+ .setURL(client.web);
+ const snipes = client.esnipes.get(args[0]) || [];
+ if (interaction.guild.channels.cache.get(args[0]).type !== "GUILD_TEXT")
+ interaction.followUp({ content: "Please provide a text channel" });
+ else if (args[1]) {
+ const msg = snipes[args[1] - 1];
+ if (!msg) {
+ snipes.forEach(m => {
+ const map = [];
+ for (var i = 0; i < m.attachment?.length; i++) {
+ map.push(
+ `**Attchment ${i + 1}:** [Click to view](${m.attachment[i]})`
+ );
+ }
+ if (m.author !== "No Author") {
+ description += `\n\n**Author:** ${m.author.username}#${
+ m.author.discriminator
+ } (Deleted ${moment(m.date).fromNow()})\n**ID:** ${
+ m.author.id
+ }\n**Old Content:** ${m.oldContent}\n**New Content:** ${
+ m.newContent
+ }\n${map ? map.join("\n") : ""}`;
+ i++;
+ } else {
+ description += `\n\n**Author:** None (Deleted ${moment(
+ m.date
+ ).fromNow()})\n\n**Old Content:** ${
+ m.oldContent
+ }\n**New Content:** ${m.newContent}\n${map ? map.join("\n") : ""}`;
+ i++;
+ }
+ });
+ embed.setDescription(description);
+ return interaction.followUp({ embeds: [embed] });
+ } else {
+ const map = [];
+ for (var i = 0; i < msg.attachment?.length; i++) {
+ map.push(
+ `**Attchment ${i + 1}:** [Click to view](${msg.attachment[i]})`
+ );
+ }
+ if (msg.author !== "No Author") {
+ description += `\n\n**Author:** ${msg.author.username}#${
+ msg.author.discriminator
+ } (Deleted ${moment(msg.date).fromNow()})\n**ID:** ${
+ msg.author.id
+ }\n**Old Content:** ${m.oldContent}\n**New Content:** ${
+ m.newContent
+ }\n${map ? map.join("\n") : ""}`;
+ i++;
+ } else {
+ description += `\n\n**Author:** None (Deleted ${moment(
+ msg.date
+ ).fromNow()})\n\n**Old Content:** ${m.oldContent}\n**New Content:** ${
+ m.newContent
+ }\n${map ? map.join("\n") : ""}`;
+ i++;
+ }
+ embed.setDescription(description);
+ return interaction.followUp({ embeds: [embed] });
+ }
+ } else {
+ if (!snipes.length) {
+ interaction.followUp({
+ content: "There isn't any snipe in this channel yet",
+ });
+ } else {
+ snipes.forEach(m => {
+ const map = [];
+ for (var i = 0; i < m.attachment?.length; i++) {
+ map.push(
+ `**Attchment ${i + 1}:** [Click to view](${m.attachment[i]})`
+ );
+ }
+ if (m.author !== "No Author") {
+ description += `\n\n**Author:** ${m.author.username}#${
+ m.author.discriminator
+ } (Deleted ${moment(m.date).fromNow()})\n**ID:** ${
+ m.author.id
+ }\n**Old Content:** ${m.oldContent}\n**New Content:** ${
+ m.newContent
+ }\n${map ? map.join("\n") : ""}`;
+ i++;
+ } else {
+ description += `\n\n**Author:** None (Deleted ${moment(
+ m.date
+ ).fromNow()})\n\n**Old Content:** ${
+ m.oldContent
+ }\n**New Content:** ${m.newContent}\n${map ? map.join("\n") : ""}`;
+ i++;
+ }
+ });
+ embed.setDescription(description);
+ return interaction.followUp({ embeds: [embed] });
+ }
+ }
+ },
+};
diff --git a/command/Utilities/snipe.js b/command/Utilities/snipe.js
@@ -2,8 +2,22 @@ const { MessageEmbed } = require("discord.js");
const moment = require("moment");
module.exports = {
name: "snipe",
- description: "Snipes a deleted message.",
+ description: "Snipes a deleted message",
category: "Utilities",
+ options: [
+ {
+ type: 7,
+ name: "channel",
+ description: "The sniped channel",
+ required: true,
+ },
+ {
+ type: 4,
+ name: "message",
+ description: "The sniped message",
+ required: false,
+ },
+ ],
run: async (client, interaction, args) => {
var i = 0;
var description = "";
@@ -14,95 +28,96 @@ module.exports = {
)
.setColor(client.color)
.setFooter(`Made by ${client.author}`)
+ .setTimestamp()
.setURL(client.web);
- client.snipes.reverse().forEach(msg => {
- if (msg.channel.id != interaction.channel.id) return;
- if (i >= 5) return;
- if (msg.attachment) {
- if (msg.attachment.length == 1) {
- if (msg.author !== "No Author") {
- description =
- description +
- `\n\n**Author:** ${msg.author.username}#${
- msg.author.discriminator
- } (Deleted ${moment(msg.date).fromNow()})\n**ID:** ${
- msg.author.id
- }\n**Content:** ${
- msg.content
- }\n**Attachment URL:** [Click to view](${msg.attachment})`;
+ const snipes = client.snipes.get(args[0]) || [];
+ if (interaction.guild.channels.cache.get(args[0]).type !== "GUILD_TEXT")
+ interaction.followUp({ content: "Please provide a text channel" });
+ else if (args[1]) {
+ const msg = snipes[args[1] - 1];
+ if (!msg) {
+ snipes.forEach(m => {
+ const map = [];
+ for (var i = 0; i < m.attachment?.length; i++) {
+ map.push(
+ `**Attchment ${i + 1}:** [Click to view](${m.attachment[i]})`
+ );
+ }
+ if (m.author !== "No Author") {
+ description += `\n\n**Author:** ${m.author.username}#${
+ m.author.discriminator
+ } (Deleted ${moment(m.date).fromNow()})\n**ID:** ${
+ m.author.id
+ }\n**Content:** ${m.content}\n${map ? map.join("\n") : ""}`;
i++;
- } else
- description =
- description +
- `\n\n**Author:** None (Deleted ${moment(
- msg.date
- ).fromNow()})\n\n**Content:** ${
- msg.content
- }\n**Attachment URL:** [Click to view](${msg.attachment})`;
- i++;
- } else if (msg.attachment.length > 1) {
- const map = msg.attachment.map(
- (s, i) => `**${i + 1}:** [Click to view](${s})`
- );
- if (msg.author !== "No Author") {
- description += `\n\n**Author:** ${msg.author.username}#${
- msg.author.discriminator
- } (Deleted ${moment(msg.date).fromNow()})\n**ID:** ${
- msg.author.id
- }\n**Content:** ${msg.content}\n**Attachment URLs:** \n${map.join(
- "\n"
- )}`;
- i++;
- } else
+ } else {
description += `\n\n**Author:** None (Deleted ${moment(
- msg.date
- ).fromNow()})\\n**Content:** ${
- msg.content
- }\n**Attachment URLs:** \n${map.join("\n")}`;
+ m.date
+ ).fromNow()})\n\n**Content:** ${m.content}\n${
+ map ? map.join("\n") : ""
+ }`;
+ i++;
+ }
+ });
+ embed.setDescription(description);
+ return interaction.followUp({ embeds: [embed] });
+ } else {
+ const map = [];
+ for (var i = 0; i < msg.attachment?.length; i++) {
+ map.push(
+ `**Attchment ${i + 1}:** [Click to view](${msg.attachment[i]})`
+ );
+ }
+ if (msg.author !== "No Author") {
+ description += `\n\n**Author:** ${msg.author.username}#${
+ msg.author.discriminator
+ } (Deleted ${moment(msg.date).fromNow()})\n**ID:** ${
+ msg.author.id
+ }\n**Content:** ${msg.content}\n${map ? map.join("\n") : ""}`;
i++;
} else {
- if (msg.author !== "No Author") {
- description =
- description +
- `\n\n**Author:** ${msg.author.username}#${
- msg.author.discriminator
- } (Deleted ${moment(msg.date).fromNow()})\n**ID:** ${
- msg.author.id
- }\n**Content:** ${msg.content}`;
- i++;
- } else
- description =
- description +
- `\n\n**Author:** None (Deleted ${moment(
- msg.date
- ).fromNow()})\n\n**Content:** ${msg.content}`;
+ description += `\n\n**Author:** None (Deleted ${moment(
+ msg.date
+ ).fromNow()})\n\n**Content:** ${msg.content}\n${
+ map ? map.join("\n") : ""
+ }`;
i++;
}
+ embed.setDescription(description);
+ return interaction.followUp({ embeds: [embed] });
+ }
+ } else {
+ if (!snipes.length) {
+ interaction.followUp({
+ content: "There isn't any snipe in this channel yet",
+ });
} else {
- if (msg.author !== "No Author") {
- description =
- description +
- `\n\n**Author:** ${msg.author.username}#${
- msg.author.discriminator
- } (Deleted ${moment(msg.date).fromNow()})\n**ID:** ${
- msg.author.id
- }\n**Content:** ${msg.content}`;
- i++;
- } else
- description =
- description +
- `\n\n**Author:** None (Deleted ${moment(
- msg.date
- ).fromNow()})\n\n**Content:** ${msg.content}`;
- i++;
+ snipes.forEach(m => {
+ const map = [];
+ for (var i = 0; i < m.attachment?.length; i++) {
+ map.push(
+ `**Attchment ${i + 1}:** [Click to view](${m.attachment[i]})`
+ );
+ }
+ if (m.author !== "No Author") {
+ description += `\n\n**Author:** ${m.author.username}#${
+ m.author.discriminator
+ } (Deleted ${moment(m.date).fromNow()})\n**ID:** ${
+ m.author.id
+ }\n**Content:** ${m.content}\n${map ? map.join("\n") : ""}`;
+ i++;
+ } else {
+ description += `\n\n**Author:** None (Deleted ${moment(
+ m.date
+ ).fromNow()})\n\n**Content:** ${m.content}\n${
+ map ? map.join("\n") : ""
+ }`;
+ i++;
+ }
+ });
+ embed.setDescription(description);
+ return interaction.followUp({ embeds: [embed] });
}
- });
- if (i == 0)
- return await interaction.followUp({
- content: "There isn't any snipe in this server yet",
- });
- embed.setDescription(description);
- embed.setTimestamp();
- return await interaction.followUp({ embeds: [embed] });
+ }
},
};
diff --git a/commands/Config/prefix-reset.js b/commands/Config/prefix-reset.js
@@ -1,37 +0,0 @@
-const schema = require("../../models/guilds");
-const prefix = require("../../config.json").prefix;
-module.exports = {
- name: "prefix-reset",
- aliases: ["pr"],
- description: 'Reset the prefix to "C." at the server',
- UserPerm: "ADMINISTRATOR",
- category: "Config",
- run: async (client, message, args, utils) => {
- message.channel
- .send({ content: "**Do you want to reset your prefix?**" })
- .then(async msg => {
- const emoji = await utils.confirmation(
- msg,
- message.author,
- ["✅", "❌"],
- 10000
- );
- if (emoji === "✅") {
- msg.delete();
- schema.findOne({ Guild: message.guild.id }, async (err, data) => {
- if (data) {
- data.Prefix = prefix;
- await schema.findOneAndUpdate({ Guild: message.guild.id }, data);
- }
- });
- message.channel.send({
- content: `The prefix has been reset to **${prefix}**`,
- });
- }
- if (emoji === "❌") {
- msg.delete();
- message.channel.send({ content: "Cancelled." });
- }
- });
- },
-};
diff --git a/commands/Config/prefix.js b/commands/Config/prefix.js
@@ -1,32 +0,0 @@
-const { Client, Message, MessageEmbed } = require("discord.js");
-const schema = require("../../models/guilds");
-module.exports = {
- name: "prefix",
- usage: "(Prefix)",
- description: "Set the prefix at the server",
- UserPerm: "ADMINISTRATOR",
- category: "Config",
- run: async (client, message, args) => {
- const res = args.join(" ");
- if (!res) return client.err(message, "Config", "prefix", 46);
- schema.findOne({ Guild: message.guild.id }, async (err, data) => {
- if (err) throw err;
- if (data) {
- schema.findOne({ Guild: message.guild.id }, async (err, data) => {
- data.Prefix = res;
- await schema.findOneAndUpdate({ Guild: message.guild.id }, data);
- });
- message.channel.send(`Your prefix has been updated to **${res}**`);
- } else {
- data = new schema({
- Guild: message.guild.id,
- Prefix: res,
- });
- data.save();
- message.channel.send(
- `Custom prefix in this server is now set to **${res}**`
- );
- }
- });
- },
-};
diff --git a/commands/Config/premium.js b/commands/Config/premium.js
@@ -1,58 +0,0 @@
-const { Client, Message, MessageEmbed } = require("discord.js");
-module.exports = {
- name: "premiumserveradd",
- category: "Config",
- timeout: 1000 * 60,
- aliases: ["psadd", "psa", "premiumserver"],
- description: "Add premium to a server",
- Premium: true,
- run: async (client, message, args) => {
- try {
- const user = await client.data.getUser(message.author.id);
- const guild = await client.data.getGuild(message.guild.id);
- if (guild.Premium == true) {
- return client.err(message, "Config", "premium", 506);
- }
- if (
- (user.Tier == 1 && user.PremiumServers.length >= 5) ||
- (user.Tier == 2 && user.PremiumServers.length >= 2) ||
- (user.Tier == 3 && user.PremiumServers.length >= 0)
- ) {
- return client.err(message, "Config", "premium", 505);
- }
- await client.data.setPremium(message.guild.id, "true");
- await client.data.pushGuild(message.author.id, message.guild.id, "push");
- message.channel.send(
- new MessageEmbed()
- .setTitle("Success!")
- .setDescription(`Premium added to **${message.guild.name}**! \n`)
- .setFooter("Thank you for supporting Cath!")
- .setColor("GREEN")
- .setTimestamp()
- .setAuthor(
- message.author.tag,
- message.author.displayAvatarURL({ dynamic: true })
- )
- );
- client.ServerLog.send(
- new MessageEmbed()
- .setTitle("New Premium Server")
- .addField("Server Info", [
- `**>Server Name**: \n${message.guild.name}`,
- `**>Server ID**: \n${message.guild.id}`,
- `**>Server Member Count**: \n${message.guild.memberCount}`,
- ])
- .addField("Owner Info", [
- `**>Owner Tag**: \n${message.guild.owner.user.tag}`,
- `**>Owner ID**: \n${message.guild.owner.id}`,
- ])
- .setTimestamp()
- .setThumbnail(message.guild.iconURL({ dynamic: true }))
- .setColor("GREEN")
- );
- } catch (e) {
- console.log(e);
- return client.err(message, "Config", "premium", 999);
- }
- },
-};
diff --git a/commands/Config/set.js b/commands/Config/set.js
@@ -1,55 +0,0 @@
-const { Client, Message, MessageEmbed } = require("discord.js");
-module.exports = {
- name: "set",
- description: "Set Goodbye/Welcome/Log Channel for the server",
- usage: "(goodbye/welcome/log) (#Channel)",
- UserPerm: "ADMINISTRATOR",
- category: "Config",
- run: async (client, message, args) => {
- if (!args[0]) return client.err(message, "Config", "set", 45);
- if (args[0].toLowerCase() === "goodbye") {
- const channel = message.mentions.channels.first();
- if (!channel) return client.err(message, "Config", "set", 28);
- await client.data.setGoodbye(message.guild.id, channel.id);
- message.channel.send(`Saved ${channel} as the goodbye channel.`);
- } else if (args[0].toLowerCase() === "log") {
- const channel = message.mentions.channels.first();
- if (!channel) return client.err(message, "Config", "set", 28);
- let webhookid;
- let webhooktoken;
- await channel
- .createWebhook(message.guild.name, {
- avatar: message.guild.iconURL({ format: "png" }),
- })
- .then(webhook => {
- webhookid = webhook.id;
- webhooktoken = webhook.token;
- });
- await client.data.setLog(
- message.guild.id,
- channel.id,
- webhookid,
- webhooktoken
- );
- message.channel.send(`Saved ${channel} as the log channel.`);
- } else if (args[0].toLowerCase() === "welcome") {
- const channel = message.mentions.channels.first();
- if (!channel) return client.err(message, "Config", "set", 28);
- await client.data.setWelcome(message.guild.id, channel.id);
- message.channel.send(`Saved ${channel} as the welcome channel.`);
- } else if (args[0].toLowerCase() === "level") {
- if (args[1].toLowerCase() === "on" || args[1].toLowerCase() === "true") {
- await client.data.setGLevel(message.guild.id, "true");
- message.channel.send(`Levelling is enabled in this server now.`);
- } else if (
- args[1].toLowerCase() === "off" ||
- args[1].toLowerCase() === "false"
- ) {
- await client.data.setGLevel(message.guild.id, "false");
- message.channel.send(`Levelling is disabled in this server now.`);
- } else return client.err(message, "Config", "set", 45);
- } else {
- return client.err(message, "Config", "set", 45);
- }
- },
-};
diff --git a/commands/Economy/drop.js b/commands/Economy/drop.js
@@ -1,35 +0,0 @@
-const { Client, Message, MessageEmbed } = require("discord.js");
-module.exports = {
- name: "drop",
- usage: "{Channel} (Number)",
- description: "Drops money to a channel",
- category: "Economy",
- run: async (client, message, args) => {
- const p = await client.prefix(message);
- const channel = message.mentions.channels.first() || message.channel;
- const coinsAmount = args[0];
- if (!coinsAmount) {
- return client.err(message, "Economy", "drop", 5);
- }
- if ((await client.bal(message.author.id)) < coinsAmount) {
- return client.err(message, "Economy", "drop", 20);
- }
- const filter = msg =>
- msg.guild.id === message.guild.id && msg.content === `${p}claim`;
- message.channel.send("The drop has started in " + channel.toString());
- channel.send(
- `${message.author.username} has dropped a ${client.currency} bomb! Use ${p}claim to claim ${client.currency}!!`
- );
- client.rmv(message.author.id, parseInt(coinsAmount));
- channel.awaitMessages(filter, { max: 1, time: 60000 }).then(async msg => {
- const id = msg.first().author.id;
- const coinsToClaim = parseInt(coinsAmount);
- await client.add(id, coinsToClaim, message);
- msg
- .first()
- .reply(
- `Congratultions! You have claimed **${coinsToClaim}** ${client.currency}!`
- );
- });
- },
-};
diff --git a/commands/Moderation/announce.js b/commands/Moderation/announce.js
@@ -1,40 +0,0 @@
-const { Client, Message, MessageEmbed } = require("discord.js");
-module.exports = {
- name: "announce",
- UserPerm: "MANAGE_MESSAGES",
- BotPerm: "MANAGE_MESSAGES",
- usage: "{Channel} (Message)",
- description: "Announce a message to a channel.",
- category: "Moderation",
- run: async (client, message, args) => {
- const channel = message.mentions.channels.first() || message.channel;
- if (!args[0]) return client.err(message, "Moderation", "announce", 4);
- try {
- message.delete();
- channel.send(
- new MessageEmbed()
- .setAuthor(
- `Sent by ${message.member.displayName}`,
- message.author.displayAvatarURL({ dynamic: true })
- )
- .setDescription(args.slice(0).join(" "))
- .setTimestamp()
- .setColor(client.color)
- );
- message.reply(
- new MessageEmbed()
- .setTitle(`Message Announced`)
- .addField("**Moderator**", message.author.tag, true)
- .setTimestamp()
- .setFooter(
- message.member.displayName,
- message.author.displayAvatarURL({ dynamic: true })
- )
- .setColor(client.color)
- );
- } catch (e) {
- console.log(e);
- return client.err(message, "Moderation", "announce", 999);
- }
- },
-};
diff --git a/commands/Moderation/clear.js b/commands/Moderation/clear.js
@@ -1,42 +0,0 @@
-const { Client, Message, MessageEmbed } = require("discord.js");
-const ms = require("ms");
-module.exports = {
- name: "purge",
- aliases: ["clear", "c"],
- UserPerm: "MANAGE_MESSAGES",
- BotPerm: "MANAGE_MESSAGES",
- description: "Clear/Purge 1-100 messages in the channel",
- usage: "(Number)",
- category: "Moderation",
- run: async (client, message, args) => {
- if (
- !args[0] ||
- isNaN(args[0]) ||
- parseInt(args[0]) > 100 ||
- parseInt(args[0] < 0)
- )
- return client.err(message, "Moderation", "clear", 7);
- const messages = await message.channel.messages.fetch({
- limit: parseInt(args[0]),
- });
- const usable = messages.filter(
- m => m.createdTimestamp - Date.now() < ms("14d") && !m.pinned
- );
- await message.delete();
- await message.channel.bulkDelete(usable).then(() =>
- message.channel
- .send(
- new MessageEmbed()
- .setTitle(`Message Cleared`)
- .addField("**Moderator**", message.author.tag, true)
- .setTimestamp()
- .setFooter(
- message.member.displayName,
- message.author.displayAvatarURL({ dynamic: true })
- )
- .setColor(client.color)
- )
- .then(m => m.delete({ timeout: 10000 }))
- );
- },
-};
diff --git a/commands/Owner/blacklist.js b/commands/Owner/blacklist.js
@@ -1,26 +0,0 @@
-const { Client, Message, MessageEmbed } = require("discord.js");
-module.exports = {
- name: "bk",
- category: "Owner",
- usage: "(User) (Toggle) (Reason)",
- description: "Blacklist someone from the bot",
- Owner: true,
- run: async (client, message, args) => {
- let user = args[0];
- toggle = args[1];
- reason = args.slice(2).join(" ");
- if (toggle === "true") {
- await client.data.BK(user, toggle, reason);
- message.reply(
- `**Blacklisted** ${message.guild.members.cache.get(
- user
- )}.\n**Reason: **${reason}`
- );
- } else {
- await client.data.BK(user, toggle, reason);
- message.reply(
- `Removed blacklist from ${message.guild.members.cache.get(user)}`
- );
- }
- },
-};
diff --git a/commands/Owner/info.js b/commands/Owner/info.js
@@ -1,4 +1,4 @@
-const { Client, Message, MessageEmbed } = require("discord.js");
+const { MessageEmbed } = require("discord.js");
module.exports = {
name: "info",
Owner: true,
@@ -9,102 +9,8 @@ module.exports = {
message.guild.iconURL({ dynamic: true, size: 4096 })
)
.setColor(client.color)
- .addFields(
- {
- name: "<@&840539971068755989>",
- value: "The Server Owner",
- inline: false,
- },
- {
- name: "<@&827182913002012694>",
- value: "🤐",
- inline: true,
- },
- {
- name: "<@&765928569397575750>",
- value: "The unpingable ones",
- inline: true,
- },
- {
- name: "<@&854306717977935882>",
- value: "The Server Owner's Bots",
- inline: true,
- },
- {
- name: "<@&832145795523280907>",
- value: "The unpingable ones",
- inline: true,
- },
- {
- name: "<@&756805977298305135>",
- value: "The ones who can control the server",
- inline: true,
- },
- {
- name: "<@&840537065984491531>",
- value: "Premium users of Cath",
- inline: true,
- },
- {
- name: "<@&856223068782723093>",
- value: "The developers and the helpers of Cath",
- inline: true,
- },
- {
- name: "<@&836279963069710336>",
- value: "VIPs of this server. Chosen by the server owner",
- inline: true,
- },
- {
- name: "<@&807976942066204674>",
- value: "Partner of Cath or the server",
- inline: true,
- },
- {
- name: "<@&828273514497835059>",
- value: "The wealthy ones",
- inline: true,
- },
- {
- name: "<@&756805886244028427>",
- value: "Old VIPs",
- inline: true,
- },
- {
- name: "<@&749676662098100235>",
- value: "Maybe useful for the server",
- inline: true,
- },
- {
- name: "<@&840536973126270976>",
- value: "Platium camo color",
- inline: true,
- },
- {
- name: "<@&841200768706543636>",
- value: "Gold camo color",
- inline: true,
- },
- {
- name: "<@&841026716181069824>",
- value: "Receive announcements",
- inline: true,
- },
- {
- name: "<@&841200845885538325>",
- value: "Recevie updates for Cath(s)",
- inline: true,
- },
- {
- name: "<@&841026772790673448>",
- value: "Recevie updates for Night's YouTube",
- inline: true,
- },
- {
- name: "<@&840926118617809006>",
- value: "People who are bad",
- inline: true,
- }
+ .setDescription(
+ "<@&840539971068755989>\nThe Server Owner\n<@&765928569397575750>\nThe unpingable ones\n<@&854306717977935882>\nThe Server Owner's Bots\n<@&832145795523280907>\nThe unpingable ones\n<@&756805977298305135>\nThe ones who can control the server\n<@&840537065984491531>\nPremium users of Cath\n<@&856223068782723093>\nThe developers and the helpers of Cath\n<@&836279963069710336>\nVIPs of this server. Chosen by the server owner\n<@&807976942066204674>\nPartner of Cath or the server\n<@&828273514497835059>\nThe wealthy ones\n<@&756805886244028427>\nOld VIPs\n<@&749676662098100235>\nMaybe useful for the server\n<@&840536973126270976>\nPlatium camo color\n<@&841200768706543636>\nGold camo color\n<@&841026716181069824>\nReceive announcements\n<@&841200845885538325>\nRecevie updates for Cath(s)\n<@&841026772790673448>\nRecevie updates for Night's YouTube\n<@&840926118617809006>\nPeople who are bad"
)
.setThumbnail(client.user.displayAvatarURL())
.setURL(client.web)
diff --git a/commands/Owner/setBotAvatar.js b/commands/Owner/setBotAvatar.js
@@ -1,20 +0,0 @@
-const { MessageEmbed } = require("discord.js");
-module.exports = {
- name: "setavatar",
- category: "Owner",
- usage: "(Link)",
- description: "Set bot avatar from a link",
- Owner: true,
- run: async (client, message, args) => {
- if (message.deletable) {
- message.delete();
- }
- if (!args || args.length < 1) {
- return client.err(message, "Owner", "setBotAvatar", 404);
- }
- client.user.setAvatar(args.join(" "));
- message.channel
- .send("Profile picture has been changed.")
- .then(m => m.delete({ timeout: 10000 }));
- },
-};
diff --git a/commands/Owner/status.js b/commands/Owner/status.js
@@ -1,22 +0,0 @@
-const { Client, Message, MessageEmbed } = require("discord.js");
-module.exports = {
- name: "status",
- usage: "(Boolean)",
- description: "Maintenance mode",
- category: "Owner",
- Owner: true,
- run: async (client, message, args) => {
- if (!args[0]) return message.channel.send("True or False?");
- if (args[0].toLowerCase() === "true") {
- await client.data.maintenance(client.user.id, "true");
- message.channel.send(
- `**${client.user.username}** is under maintenance now`
- );
- } else if (args[0].toLowerCase() === "false") {
- await client.data.maintenance(client.user.id, "false");
- message.channel.send(`**${client.user.username}** back online`);
- } else {
- message.channel.send("True or False?");
- }
- },
-};
diff --git a/commands/Utilities/emojiadd.js b/commands/Utilities/emojiadd.js
@@ -1,59 +0,0 @@
-const { Client, Message, MessageEmbed, Util } = require("discord.js");
-module.exports = {
- name: "emojiadd",
- usage: "(Link/Photo) (Name)",
- aliases: ["addemoji"],
- description: "Show an emoji URL or add the emoji to the server",
- category: "Utilities",
- run: async (client, message, args) => {
- if (!args.length) return client.err(message, "Utilities", "emojiadd", 0);
-
- if (message.attachments) {
- message.attachments.map(m => {
- if (
- m.name.endsWith(".png") ||
- m.name.endsWith(".jpeg") ||
- m.name.endsWith(".jpeg") ||
- m.name.endsWith(".gif") ||
- m.name.endsWith(".webp")
- ) {
- try {
- if (message.attachments.map(u => u.size) > 256000)
- return client.err(message, "Utilities", "emojiadd", 50);
- if (args[0].length < 2 || args[0].match(/\W/))
- return client.err(message, "Utilities", "emojiadd", 49);
- message.attachments.map(u => {
- try {
- message.guild.emojis.create(u.url, args[0]).then(msg => {
- const em = message.guild.emojis.cache.find(
- a => a.name == args[0]
- );
- message.reply(`Added <:${em.name}:${em.id}> to the server`);
- });
- } catch (e) {
- console.log(e);
- return client.err(message, "Utilities", "emojiadd", 999);
- }
- });
- } catch (e) {
- console.log(e);
- return client.err(message, "Utilities", "emojiadd", 999);
- }
- } else return client.err(message, "Utilities", "emojiadd", 48);
- });
- }
- if (args[0].includes("https")) {
- try {
- if (args[1].length < 2 || args[1].match(/\W/))
- return client.err(message, "Utilities", "emojiadd", 49);
- message.guild.emojis.create(args[0], args[1]).then(msg => {
- const em = message.guild.emojis.cache.find(a => a.name == args[1]);
- message.reply(`Added <:${em.name}:${em.id}> to the server`);
- });
- } catch (e) {
- console.log(e);
- return client.err(message, "Utilities", "emojiadd", 999);
- }
- } else return client.err(message, "Utilities", "emojiadd", 101);
- },
-};
diff --git a/commands/Utilities/esnipe.js b/commands/Utilities/esnipe.js
@@ -1,157 +0,0 @@
-const { Client, Message, MessageEmbed } = require("discord.js");
-const moment = require("moment");
-module.exports = {
- name: "editsnipe",
- category: "Utilities",
- aliases: ["esnipe"],
- usage: "{Channel}",
- description: "Snipe an edited message",
- run: async (client, message, args) => {
- let channel =
- message.mentions.channels.first() ||
- message.guild.channels.cache.get(args[0]) ||
- message.channel,
- snipes = client.esnipes.get(channel.id),
- page = 0,
- reactions = ["◀️", "⏪", "⏩", "▶️"];
- if (!snipes)
- return message.reply(
- `No snipes have been found for the channel \`${channel.name}\``
- );
-
- let users = await Promise.all(
- snipes.map(snipe =>
- client.users.fetch(
- snipe.author === "No author found??" ? client.user.id : snipe.author
- )
- )
- );
- if (args[0] === "--history") {
- let embed = new MessageEmbed()
- .addField("Channel:", `${channel} (${channel.name})`)
- .addField(
- "History",
- `${
- snipes.length > 20
- ? `${snipes
- .map(
- (snipe, c) =>
- `${users[c].tag} | ${moment
- .utc(snipe.date)
- .fromNow()} | snipe **${c + 1}**`
- )
- .slice(0, 20)
- .join("\n")}\n ${snipes.length - 20} more...`
- : `${snipes
- .map(
- (snipe, c) =>
- `${users[c].tag} | ${moment
- .utc(snipe.date)
- .fromNow()} | snipe **${c + 1}**`
- )
- .slice(0, 20)
- .join("\n")}`
- }`
- );
- let msg = await message.channel.send(embed);
-
- await Promise.all(reactions.map(r => msg.react(r)));
- const backwardsFilter = (reaction, user) =>
- user.id === message.author.id &&
- reactions.includes(reaction.emoji.name);
- const backwards = msg.createReactionCollector(backwardsFilter);
- backwards.on("collect", r => {
- switch (r.emoji.name) {
- case "⏪":
- page = 0;
- break;
- case "⏩":
- page = snipes.length;
- break;
- case "◀️":
- page === 1
- ? (page = 0)
- : page === 0
- ? (page = snipes.length)
- : page--;
- break;
- case "▶️":
- page === snipes.length ? (page = 1) : page++;
- break;
- }
- if (page === 0) {
- let embed = new MessageEmbed()
- .addField("Channel:", `${channel} (${channel.name})`)
- .addField(
- "History",
- `${snipes.length
- .map(
- (snipe, c) =>
- `${users[c].tag} | ${moment
- .utc(snipe.date)
- .fromNow()} | snipe **${c + 1}**`
- )
- .slice(0, 20)
- .join("\n")}`
- );
- msg.edit(embed);
- } else {
- let newembed = new MessageEmbed()
- .setAuthor(
- `${client.users.cache.get(snipes[page - 1].author).tag}`,
- `${client.users.cache
- .get(snipes[page - 1].author)
- .displayAvatarURL({ format: "png", dynamic: true })}`
- )
- .addField("Channel:", `${channel} (${channel.name})`)
- .addField("When:", `${moment.utc(snipes[page - 1].date).fromNow()}`)
- .addField(
- "Content:",
- snipes[page - 1].content || "No content could be found"
- )
- .addField(
- "New content:",
- snipes[page - 1].newContent || "No new content could be found"
- )
- .setFooter(`${page}/${snipes.length}`);
- snipes[page - 1].image !== null
- ? newembed.setImage(snipes[page - 1].image)
- : "";
- msg.edit(newembed);
- }
- });
- } else {
- let num = isNaN(args[0])
- ? 0
- : !args[0]
- ? 0
- : args[0] < snipes.length && args[0] > 0
- ? args[0]
- : 0;
- let embed = new MessageEmbed()
- .setAuthor(
- `${
- client.users.cache.get(snipes[num].author)
- ? client.users.cache.get(snipes[num].author).tag
- : "no"
- }`,
- `${client.users.cache
- .get(snipes[num].author)
- .displayAvatarURL({ format: "png", dynamic: true })}`
- )
- .addField("Channel:", `${channel} (${channel.name})`)
- .addField("When:", `${moment.utc(snipes[num].date).fromNow()}`)
- .addField(
- "Content:",
- snipes[num].content || "No content could be found"
- )
- .addField(
- "New content:",
- snipes[num].newContent || "No new content could be found"
- )
- .setFooter(`Showing snipe ${parseInt(num) + 1}`);
- snipes[0].image !== null ? embed.setImage(snipes[num].image) : "";
- await message.channel.send(embed);
- }
- },
-};
diff --git a/commands/Utilities/help.js b/commands/Utilities/help.js
@@ -1,6 +1,4 @@
const Discord = require("discord.js");
-const { readdirSync } = require("fs");
-
module.exports = {
name: "help",
aliases: ["h"],
diff --git a/events/guild.js b/events/guild.js
@@ -58,6 +58,6 @@ client.prefix = async function (message) {
.findOne({ Guild: message.guild.id })
.catch(err => console.log(err));
if (data) custom = data.Prefix;
- else custom = client.configprefix;
+ else custom = client.config.prefix;
return custom;
};
diff --git a/events/interactionCreate.js b/events/interactionCreate.js
@@ -1,5 +1,6 @@
const client = require("../bot");
const utils = require("../util/functions/function");
+const codmclient = require("../client/CODMClient");
client.on("interactionCreate", async interaction => {
if (interaction.isCommand()) {
await interaction.deferReply({ ephemeral: false }).catch(() => {});
@@ -17,10 +18,68 @@ client.on("interactionCreate", async interaction => {
interaction.member = interaction.guild.members.cache.get(
interaction.user.id
);
- if (!interaction.member.permissions.has(cmd.userPerms || []))
- return await interaction.followUp({ content: "no perm" });
+ const data = {};
+ let guildDB = await client.data.getGuild(interaction.guild.id);
+ if (!guildDB) return;
+ let userDB = await client.data.getUser(interaction.user.id);
+ if (!userDB) return;
+ let userEconDB = await client.data.getUserEcon(interaction.user.id);
+ data.Guild = guildDB;
+ data.User = userDB;
+ data.UserEcon = userEconDB;
+ if (!guildDB) await client.data.CreateGuild(interaction.guild.id);
+ if (!userEconDB) await client.createProfile(interaction.user.id);
try {
- cmd.run(client, interaction, args, utils);
+ if (data.User) {
+ if (data.User.Blacklist)
+ return interaction.followUp({
+ content:
+ "You have been blacklisted from the bot, please contact the developers to appeal",
+ });
+ }
+ if (cmd.Owner) {
+ if (!client.owners.includes(interaction.user.id)) return;
+ }
+ if (cmd.Premium) {
+ if (!data.User.Premium) {
+ return interaction.followUp({
+ embeds: [
+ new MessageEmbed()
+ .setURL(client.web)
+ .setAuthor(
+ interaction.user.tag,
+ interaction.user.displayAvatarURL({ dynamic: true })
+ )
+ .setColor(client.color)
+ .setDescription(
+ `You aren't a premium user. You can either boost support server or subscribe to developer's team [Ko-fi](https://ko-fi.com/cathteam) or gift a nitro to one of the developer team to be premium user`
+ )
+ .setTimestamp()
+ .setFooter(`Made by ${client.author}`),
+ ],
+ });
+ }
+ }
+ if (cmd.Level) {
+ if (!data.Guild.Level) return;
+ }
+ if (!interaction.guild.me.permissions.has(cmd.BotPerms || []))
+ return interaction.followUp({
+ content: `You can't use this command. I need to have ${cmd.BotPerms} permission to use this command.`,
+ });
+ if (!interaction.member.permissions.has(cmd.userPerms || []))
+ return interaction.followUp({
+ content: `You can't use this command. I need to have ${cmd.UserPerms} permission to use this command.`,
+ });
+ if (data.Guild) {
+ if (data.Guild.Category) {
+ if (data.Guild.Category.includes(cmd.directory)) return;
+ }
+ if (data.Guild.Commands) {
+ if (data.Guild.Commands.includes(cmd.name)) return;
+ }
+ }
+ cmd.run(client, interaction, args, utils, codmclient);
client.channels.cache.get(client.CMDLog).send({
content: `\`${interaction.user.tag}(${interaction.user.id})\`\n has used \n**${cmd.name}**\n command in \n\`${interaction.guild.name}(${interaction.guild.id})\``,
});
@@ -52,10 +111,8 @@ client.on("interactionCreate", async interaction => {
interaction.member = interaction.guild.members.cache.get(
interaction.user.id
);
- if (!interaction.member.permissions.has(ownercmd.userPerms || []))
- return await interaction.followUp({ content: "no perm" });
try {
- ownercmd.run(client, interaction, args, utils);
+ ownercmd.run(client, interaction, args, utils, codmclient);
client.channels.cache.get(client.CMDLog).send({
content: `\`${interaction.user.tag}(${interaction.user.id})\`\n has used \n**${ownercmd.name}**\n command in \n\`${interaction.guild.name}(${interaction.guild.id})\``,
});
diff --git a/events/messageCreate.js b/events/messageCreate.js
@@ -1,5 +1,5 @@
const client = require("../bot");
-const codmclient = require("../client/codmclient");
+const codmclient = require("../client/CODMClient");
const leven = require("leven");
const { MessageEmbed } = require("discord.js");
const cooldown = require("../models/cooldown");
@@ -107,9 +107,6 @@ client.on("messageCreate", async message => {
return message.reply({
content: `You can't use this command. I need to have ${command.BotPerm} permission to use this command.`,
});
- client.channels.cache.get(client.CMDLog).send({
- content: `\`${message.author.tag}(${message.author.id})\`\n has used \n**${command.name}**\n command in \n\`${message.guild.name}(${message.guild.id})\``,
- });
if (data.Guild) {
if (data.Guild.Category) {
if (data.Guild.Category.includes(command.directory)) return;
diff --git a/events/messageDelete.js b/events/messageDelete.js
@@ -2,30 +2,26 @@ const client = require("../bot");
client.on("messageDelete", async message => {
let all = [];
if (message.attachments) {
- const mapped = message.attachments.map(a => {
- if (
- a.name.endsWith(".png") ||
- a.name.endsWith(".jpg") ||
- a.name.endsWith(".jpeg") ||
- a.name.endsWith(".gif") ||
- a.name.endsWith(".webp")
- )
- return message.attachments.first().proxyURL;
- else return message.attachments.first().url;
- });
- if (mapped.length == 1) {
- all.push(mapped);
- } else if (mapped.length > 1) {
- message.attachments.map(b => {
- all.push(mapped);
- });
+ const files = message.attachments.map(e => e);
+ for (var i = 0; i < files.length; i++) {
+ const file = files[i];
+ all.push(file.url);
}
}
- client.snipes.push({
+ if (message.embeds) {
+ for (var i = 0; i < message.embeds.length; i++) {
+ const files = message.embeds.map(e => e.image?.url);
+ all.push(files);
+ }
+ }
+ const snipes = client.snipes.get(message.channel.id) || [];
+ snipes.push({
channel: message.channel,
content: message.content ? message.content : "None",
author: message.author ? message.author : "No Author",
attachment: message.attachments ? all : null,
date: new Date(),
});
+ snipes.splice(10);
+ client.snipes.set(message.channel.id, snipes);
});
diff --git a/events/messageReaction.js b/events/messageReaction.js
@@ -1,30 +0,0 @@
-const client = require("../bot");
-const Schema = require("../models/reaction");
-
-client.on("messageReactionAdd", async (reaction, user) => {
- if (reaction.message.partial) await reaction.message.fetch();
- if (reaction.partial) await reaction.fetch();
- if (user.bot) return;
- if (!reaction.message.guild) return;
- Schema.findOne({ Message: reaction.message.id }, async (err, data) => {
- if (!data) return;
- if (!Object.keys(data.Roles).includes(reaction.emoji.name)) return;
- const [roleid] = data.Roles[reaction.emoji.name];
- reaction.message.guild.members.cache.get(user.id).roles.add(roleid);
- user.send(`A role has been added`);
- });
-});
-client.on("messageReactionRemove", async (reaction, user) => {
- if (reaction.message.partial) await reaction.message.fetch();
- if (reaction.partial) await reaction.fetch();
- if (user.bot) return;
- if (!reaction.message.guild) return;
- Schema.findOne({ Message: reaction.message.id }, async (err, data) => {
- if (!data) return;
- if (!Object.keys(data.Roles).includes(reaction.emoji.name)) return;
-
- const [roleid] = data.Roles[reaction.emoji.name];
- reaction.message.guild.members.cache.get(user.id).roles.remove(roleid);
- user.send(`A role has been removed`);
- });
-});
diff --git a/events/messageUpdate.js b/events/messageUpdate.js
@@ -1,69 +1,28 @@
const client = require("../bot");
-client.on("messageUpdate", (message, newMessage) => {
- function getAllTextFromEmbed(embed) {
- let text = "";
- function getTime(now) {
- const date = new Date(now);
- const escape = value => `0${value}`.slice(-2);
- const ampm = date.getHours() >= 12 ? "PM" : "AM";
-
- return `${date.getMonth()}/${date.getDate()}/${date.getFullYear()} at ${escape(
- date.getHours()
- )}:${escape(date.getMinutes())}:${escape(date.getSeconds())}${ampm}`;
+client.on("messageUpdate", async (message, newMessage) => {
+ let all = [];
+ if (message.attachments) {
+ const files = message.attachments.map(e => e);
+ for (var i = 0; i < files.length; i++) {
+ const file = files[i];
+ all.push(file.url);
}
-
- if (embed.title)
- text += `**${embed.title
- .replace(/(https?:\/\/)?discord\.gg\/(\w+)/g, "Invite")
- .replace(/\[(.*)\]\((.*)\)/g, "Hyper link")}**`;
- if (embed.description)
- text += `\n${embed.description
- .replace(/(https?:\/\/)?discord\.gg\/(\w+)/g, "Invite")
- .replace(/\[(.*)\]\((.*)\)/g, "Hyper link")}`;
- if (embed.fields) {
- text += "\n";
- for (const field of embed.fields)
- text += `\n**${field.name
- .replace(/(https?:\/\/)?discord\.gg\/(\w+)/g, "Invite")
- .replace(/\[(.*)\]\((.*)\)/g, "Hyper link")}**\n ${field.value
- .replace(/(https?:\/\/)?discord\.gg\/(\w+)/g, "Invite")
- .replace(/\[(.*)\]\((.*)\)/g, "Hyper link")}`;
- }
- if (embed.footer) {
- let field = `\n\n**${embed.footer.text
- .replace(/(https?:\/\/)?discord\.gg\/(\w+)/g, "Invite")
- .replace(/\[(.*)\]\((.*)\)/g, "Hyper link")}`;
-
- if (embed.timestamp) {
- const time =
- embed.timestamp instanceof Date
- ? getTime(embed.timestamp.getTime())
- : embed.timestamp;
- field += `at ${time}`;
- }
-
- text += `${field}**`;
+ }
+ if (message.embeds) {
+ for (var i = 0; i < message.embeds.length; i++) {
+ const files = message.embeds.map(e => e.image?.url);
+ all.push(files);
}
-
- return text;
}
- let snipes = client.esnipes.get(message.channel.id) || [];
- snipes.unshift({
- content:
- message.embeds.length > 0
- ? getAllTextFromEmbed(message.embeds[0])
- : message.content,
- newContent:
- newMessage.embeds.length > 0
- ? getAllTextFromEmbed(newMessage.embeds[0])
- : newMessage.content,
- author: message.author ? message.author.id : "No author found??",
- image: message.attachments.first()
- ? message.attachments.first().proxyURL
- : message.embeds.length > 0 && message.embeds[0].image
- ? message.embeds[0].image.url
- : "",
- date: Date.now(),
+ const esnipes = client.esnipes.get(message.channel.id) || [];
+ esnipes.push({
+ channel: message.channel,
+ oldContent: message.content ? message.content : "None",
+ newContent: newMessage.content ? newMessage.content : "None",
+ author: message.author ? message.author : "No Author",
+ attachment: message.attachments ? all : null,
+ date: new Date(),
});
- client.esnipes.set(message.channel.id, snipes);
+ esnipes.splice(10);
+ client.esnipes.set(message.channel.id, esnipes);
});
diff --git a/events/ready.js b/events/ready.js
@@ -1,6 +1,17 @@
const client = require("../bot");
const version = require("../package.json").version;
+const starboardClient = require("../client/StarboardClient");
+const g = require("../models/guilds");
client.on("ready", async () => {
client.manager.init(client.user.id);
+ const data = await g.find();
+ starboardClient.config.guilds.set(
+ data.map(x => {
+ return {
+ id: x.Guild,
+ options: { starCount: x.StarCount, starboardChannel: x.Starboard },
+ };
+ })
+ );
console.log(`${client.user.username} ✅\nVersion: v${version}`);
});
diff --git a/events/starboard.js b/events/starboard.js
@@ -1,83 +1,8 @@
const client = require("../bot");
-const { MessageEmbed } = require("discord.js");
+const starboardclient = require("../client/StarboardClient");
client.on("messageReactionAdd", async (reaction, user) => {
- const star = async () => {
- const starch = reaction.message.guild.channels.cache.find(
- n => n.name.toLowerCase() === "starboard"
- );
- const msgs = await starch.messages.fetch({ limit: 100 });
- const here = msgs.find(msg =>
- msg.embeds.length === 1
- ? msg.embeds[0].footer.text.startsWith(reaction.message.id)
- ? true
- : false
- : false
- );
- if (here) here.edit(`${reaction.count} - ⭐`);
- else {
- const embed = new MessageEmbed()
- .setColor(client.color)
- .setTitle(
- `From ${reaction.message.author.tag}`,
- reaction.message.author.displayAvatarURL({ dynamic: true })
- )
- .setThumbnail(
- reaction.message.author.displayAvatarURL({ dynamic: true })
- )
- .addField(`Message`, `[Jump!](${reaction.message.url})`)
- .setDescription(
- `Content: ${
- reaction.message.content ? reaction.message.content : "None"
- }`
- )
- .setImage(
- reaction.message.attachments.length
- ? reaction.message.attachments.first().url
- : null
- )
- .setFooter(`${reaction.message.id}`)
- .setTimestamp(reaction.message.createdTimestamp);
- if (starch) {
- starch.send({ content: "1 - ⭐", embeds: [embed] });
- }
- }
- };
- if (reaction.emoji.name === "⭐") {
- if (reaction.message.channel.name.toLowerCase() === "starboard") return;
- if (reaction.message.partial) {
- await reaction.fetch();
- await reaction.message.fetch();
- star();
- } else star();
- }
+ starboardclient.listener(reaction);
});
-client.on("messageReactionRemove", async (reaction, user) => {
- const star = async () => {
- const starch = reaction.message.guild.channels.cache.find(
- n => n.name.toLowerCase() === "starboard"
- );
- const msgs = await starch.messages.fetch({ limit: 100 });
- const here = msgs.find(msg =>
- msg.embeds.length === 1
- ? msg.embeds[0].footer.text.startsWith(reaction.message.id)
- ? true
- : false
- : false
- );
- if (here) {
- if (reaction.count === 0) {
- setTimeout(function () {
- here.delete();
- }, 5000);
- } else here.edit(`${reaction.count} - ⭐`);
- }
- };
- if (reaction.emoji.name === "⭐") {
- if (reaction.message.channel.name.toLowerCase() === "starboard") return;
- if (reaction.message.partial) {
- await reaction.fetch();
- await reaction.message.fetch();
- star();
- } else star();
- }
+client.on("messageReactionRemove", async reaction => {
+ starboardclient.listener(reaction);
});
diff --git a/events/typingStart.js b/events/typingStart.js
@@ -0,0 +1,11 @@
+const client = require("../bot");
+client.on("typingStart", async typing => {
+ if (!typing.user) return;
+ if (typing.user.bot) return;
+ if (!typing.channel) return;
+ if (typing.channel.type !== "DM") return;
+ typing.user.send({
+ content:
+ "```DMs is reserved for bug reports/suggestions/feedbacks/queries and is forwarded to the developers. Please refrain from using it as a clipboard or trying to run commands in here [by violating this condition, you agree to let us sell your data]```",
+ });
+});
diff --git a/models/custom-commands.js b/models/custom-commands.js
@@ -1,11 +0,0 @@
-const mongoose = require("mongoose");
-module.exports = mongoose.model(
- "custom-commands",
- new mongoose.Schema({
- Guild: String,
- Command: String,
- Response: Array,
- Delete: Boolean,
- Random: Boolean,
- })
-);
diff --git a/models/guilds.js b/models/guilds.js
@@ -19,6 +19,22 @@ module.exports = mongoose.model(
Log: { type: String, default: "null" },
LogWebhookID: { type: String, default: "null" },
LogWebhookToken: { type: String, default: "null" },
+ Starboard: {
+ type: String,
+ default: "null",
+ },
+ StarCount: {
+ type: Number,
+ default: 0,
+ },
+ Muterole: {
+ type: String,
+ default: "null",
+ },
+ Chatbot: {
+ type: String,
+ default: "null",
+ },
Premium: {
type: Boolean,
default: false,
diff --git a/models/modmail.js b/models/modmail.js
@@ -1,11 +0,0 @@
-const mongoose = require("mongoose");
-
-module.exports = mongoose.model(
- "modmail",
- new mongoose.Schema({
- Guild: String,
- Category: String,
- Choices: Object,
- Role: String,
- })
-);
diff --git a/models/reaction.js b/models/reaction.js
@@ -1,10 +0,0 @@
-const mongoose = require("mongoose");
-
-module.exports = mongoose.model(
- "reaction-roles",
- new mongoose.Schema({
- Guild: String,
- Message: String,
- Roles: Object,
- })
-);
diff --git a/unused/events/messageCreate.js b/unused/events/messageCreate.js
@@ -1,5 +1,5 @@
const client = require("../bot");
-const codmclient = require("../client/codmclient");
+const codmclient = require("../client/CODMClient");
const leven = require("leven");
const { MessageEmbed } = require("discord.js");
const schema = require("../unused/models/custom-commands");
diff --git a/unused/events/messageReaction.js b/unused/events/messageReaction.js
@@ -0,0 +1,30 @@
+const client = require("../../bot");
+const Schema = require("../models/reaction");
+
+client.on("messageReactionAdd", async (reaction, user) => {
+ if (reaction.message.partial) await reaction.message.fetch();
+ if (reaction.partial) await reaction.fetch();
+ if (user.bot) return;
+ if (!reaction.message.guild) return;
+ Schema.findOne({ Message: reaction.message.id }, async (err, data) => {
+ if (!data) return;
+ if (!Object.keys(data.Roles).includes(reaction.emoji.name)) return;
+ const [roleid] = data.Roles[reaction.emoji.name];
+ reaction.message.guild.members.cache.get(user.id).roles.add(roleid);
+ user.send(`A role has been added`);
+ });
+});
+client.on("messageReactionRemove", async (reaction, user) => {
+ if (reaction.message.partial) await reaction.message.fetch();
+ if (reaction.partial) await reaction.fetch();
+ if (user.bot) return;
+ if (!reaction.message.guild) return;
+ Schema.findOne({ Message: reaction.message.id }, async (err, data) => {
+ if (!data) return;
+ if (!Object.keys(data.Roles).includes(reaction.emoji.name)) return;
+
+ const [roleid] = data.Roles[reaction.emoji.name];
+ reaction.message.guild.members.cache.get(user.id).roles.remove(roleid);
+ user.send(`A role has been removed`);
+ });
+});
diff --git a/util/Data/output.json b/util/Data/output.json
@@ -1 +0,0 @@
-{"results":[{"Weapon":"AK-47","Valid":1,"ID":0,"Muzzle":"","Barrel":"MIP Extended Light Barrel","Optic":"","Stock":"No Stock","Rear Grip":"Granulated Grip Tape","Ammunition":"5.45 Large Caliber","Underbarrel":"","Laser":"OWC Laser-Tactical","Perk":"","Submitter":"Path.exe","Title":"","Short Description":"","URL":"https://media.discordapp.net/attachments/772099026195316746/847174280823308308/image3.png?width=937&height=562","Last Updated":"June 23, 2021"},{"Weapon":"AK-47","Valid":0,"ID":1,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AK-47","Valid":0,"ID":2,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AK-47","Valid":0,"ID":3,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AK-47","Valid":0,"ID":4,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AK-47","Valid":0,"ID":5,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AK-47","Valid":0,"ID":6,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AK-47","Valid":0,"ID":7,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AK-47","Valid":0,"ID":8,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AK-47","Valid":0,"ID":9,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AK117","Valid":1,"ID":0,"Muzzle":"","Barrel":"YKM Integral Supprssor","Optic":"","Stock":"No Stock","Rear Grip":"Granulated Grip Tape","Ammunition":"","Underbarrel":"Tactical Foregrip A","Laser":"OWC Laser-Tactical","Perk":"","Submitter":"Path.exe","Title":"","Short Description":"","URL":"https://media.discordapp.net/attachments/540218400413188116/856063210239164416/Screenshot_20210620-110317.png?width=1320&height=609","Last Updated":"June 23, 2021"},{"Weapon":"AK117","Valid":0,"ID":1,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AK117","Valid":0,"ID":2,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AK117","Valid":0,"ID":3,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AK117","Valid":0,"ID":4,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AK117","Valid":0,"ID":5,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AK117","Valid":0,"ID":6,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AK117","Valid":0,"ID":7,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AK117","Valid":0,"ID":8,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AK117","Valid":0,"ID":9,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"ASM10","Valid":1,"ID":0,"Muzzle":"MIP Light Flash Guard","Barrel":"","Optic":"","Stock":"No Stock","Rear Grip":"","Ammunition":"40 Round Extended Mag","Underbarrel":"","Laser":"OWC Laser-Tactical","Perk":"Slight of Hand","Submitter":"Path.exe","Title":"","Short Description":"","URL":"https://media.discordapp.net/attachments/691133003866439701/861887618820472842/Screenshot_20210706-1353282.png","Last Updated":"July 6, 2021"},{"Weapon":"ASM10","Valid":0,"ID":1,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"ASM10","Valid":0,"ID":2,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"ASM10","Valid":0,"ID":3,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"ASM10","Valid":0,"ID":4,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"ASM10","Valid":0,"ID":5,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"ASM10","Valid":0,"ID":6,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"ASM10","Valid":0,"ID":7,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"ASM10","Valid":0,"ID":8,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"ASM10","Valid":0,"ID":9,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AS VAL","Valid":1,"ID":0,"Muzzle":"","Barrel":"MIP Quick Response Barrel","Optic":"","Stock":"OWC Skeleton Stock","Rear Grip":"Granulated Grip Tape","Ammunition":"Extended Mag B","Underbarrel":"","Laser":"OWC Laser-Tactical","Perk":"","Submitter":"Path.exe","Title":"Aggressive","Short Description":"For CQB Situations","URL":"https://media.discordapp.net/attachments/540218400413188116/856063210528309258/Screenshot_20210620-110651.png?width=1320&height=609","Last Updated":"June 23, 2021"},{"Weapon":"AS VAL","Valid":1,"ID":1,"Muzzle":"","Barrel":"MIP 200mm Mid-Range Barrel","Optic":"","Stock":"YKM Combat Stock","Rear Grip":"Granulated Grip Tape","Ammunition":"Extended Mag B","Underbarrel":"","Laser":"OWC Laser-Tactical","Perk":"","Submitter":"Path.exe","Title":"Mid-Ranged","Short Description":"For Mid- Ranged Gunfights","URL":"https://media.discordapp.net/attachments/540218400413188116/856063211257200680/Screenshot_20210620-111341.png?width=1320&height=609","Last Updated":"June 23, 2021"},{"Weapon":"AS VAL","Valid":1,"ID":2,"Muzzle":"","Barrel":"MIP Quick Response Barrel","Optic":"","Stock":"OWC Ranger Stock","Rear Grip":"Ruberized Grip Tape","Ammunition":"Extended Mag B","Underbarrel":"","Laser":"OWC Laser-Tactical","Perk":"","Submitter":"Path.exe","Title":"-","Short Description":"Zero Recoil, That's it.","URL":"https://media.discordapp.net/attachments/540218400413188116/856063210997284904/Screenshot_20210620-111321.png?width=1320&height=609","Last Updated":"June 23, 2021"},{"Weapon":"AS VAL","Valid":0,"ID":3,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AS VAL","Valid":0,"ID":4,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AS VAL","Valid":0,"ID":5,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AS VAL","Valid":0,"ID":6,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AS VAL","Valid":0,"ID":7,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AS VAL","Valid":0,"ID":8,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"AS VAL","Valid":0,"ID":9,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"BK57","Valid":1,"ID":0,"Muzzle":"MIP Light Muzzel Brake","Barrel":"MIP Light Barrel(Short)","Optic":"","Stock":"","Rear Grip":"Granulated Grip Tape","Ammunition":"40 Round Fast Reload","Underbarrel":"","Laser":"OWC Laser-Tactical","Perk":"","Submitter":"Path.exe","Title":"","Short Description":"","URL":"https://media.discordapp.net/attachments/540218400413188116/856063253745238016/Screenshot_20210620-111526.png?width=1320&height=609","Last Updated":"June 23, 2021"},{"Weapon":"BK57","Valid":0,"ID":1,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"BK57","Valid":0,"ID":2,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"BK57","Valid":0,"ID":3,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"BK57","Valid":0,"ID":4,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"BK57","Valid":0,"ID":5,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"BK57","Valid":0,"ID":6,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"BK57","Valid":0,"ID":7,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"BK57","Valid":0,"ID":8,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"BK57","Valid":0,"ID":9,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"DR-H","Valid":1,"ID":0,"Muzzle":"","Barrel":"","Optic":"","Stock":"No Stock","Rear Grip":"Granulated Grip Tape","Ammunition":"25 Round OTM Mag","Underbarrel":"Tactical Foregrip A","Laser":"OWC Laser-Tactical","Perk":"","Submitter":"Path.exe","Title":"","Short Description":"","URL":"https://media.discordapp.net/attachments/540218400413188116/856063254002532362/Screenshot_20210620-111622.png?width=1320&height=609","Last Updated":"June 23, 2021"},{"Weapon":"DR-H","Valid":0,"ID":1,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"DR-H","Valid":0,"ID":2,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"DR-H","Valid":0,"ID":3,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"DR-H","Valid":0,"ID":4,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"DR-H","Valid":0,"ID":5,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"DR-H","Valid":0,"ID":6,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"DR-H","Valid":0,"ID":7,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"DR-H","Valid":0,"ID":8,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"DR-H","Valid":0,"ID":9,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"HBRa3","Valid":1,"ID":0,"Muzzle":"","Barrel":"MIP Light","Optic":"","Stock":"No Stock","Rear Grip":"Granulated Grip Tape","Ammunition":"","Underbarrel":"Tactical Foregrip A","Laser":"OWC Laser-Tactical","Perk":"","Submitter":"Path.exe","Title":"","Short Description":"","URL":"https://media.discordapp.net/attachments/540218400413188116/856063254270181396/Screenshot_20210620-111728.png?width=1320&height=609","Last Updated":"June 23, 2021"},{"Weapon":"HBRa3","Valid":0,"ID":1,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"HBRa3","Valid":0,"ID":2,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"HBRa3","Valid":0,"ID":3,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"HBRa3","Valid":0,"ID":4,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"HBRa3","Valid":0,"ID":5,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"HBRa3","Valid":0,"ID":6,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"HBRa3","Valid":0,"ID":7,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"HBRa3","Valid":0,"ID":8,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"HBRa3","Valid":0,"ID":9,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"HVK-30","Valid":1,"ID":0,"Muzzle":"Monolithic Supprssor","Barrel":"MIP Light","Optic":"","Stock":"","Rear Grip":"Granulated Grip Tape","Ammunition":"Large Caliber Ammo","Underbarrel":"","Laser":"OWC Laser-Tactical","Perk":"","Submitter":"Path.exe","Title":"","Short Description":"","URL":"https://images-ext-2.discordapp.net/external/JSvyv8bccoWsPb5e8JnH1S_e5C1lKrcTJtZy5YMpSwY/%3Fwidth%3D937%26height%3D562/https/media.discordapp.net/attachments/772099026195316746/847174261705146458/image4.png","Last Updated":"June 23, 2021"},{"Weapon":"HVK-30","Valid":0,"ID":1,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"HVK-30","Valid":0,"ID":2,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"HVK-30","Valid":0,"ID":3,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"HVK-30","Valid":0,"ID":4,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"HVK-30","Valid":0,"ID":5,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"HVK-30","Valid":0,"ID":6,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"HVK-30","Valid":0,"ID":7,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"HVK-30","Valid":0,"ID":8,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"HVK-30","Valid":0,"ID":9,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"ICR-1","Valid":1,"ID":0,"Muzzle":"","Barrel":"YKM Integral Supprssor Light","Optic":"","Stock":"No Stock","Rear Grip":"Granulated Grip Tape","Ammunition":"40 Round Fast Reload","Underbarrel":"","Laser":"OWC Laser-Tactical","Perk":"","Submitter":"Path.exe","Title":"","Short Description":"","URL":"https://media.discordapp.net/attachments/540218400413188116/856063281622286346/Screenshot_20210620-113515.png?width=1320&height=609","Last Updated":"June 23, 2021"},{"Weapon":"ICR-1","Valid":0,"ID":1,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"ICR-1","Valid":0,"ID":2,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"ICR-1","Valid":0,"ID":3,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"ICR-1","Valid":0,"ID":4,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"ICR-1","Valid":0,"ID":5,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"ICR-1","Valid":0,"ID":6,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"ICR-1","Valid":0,"ID":7,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"ICR-1","Valid":0,"ID":8,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"ICR-1","Valid":0,"ID":9,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"KN-44","Valid":1,"ID":0,"Muzzle":"MIP Light Muzzel Brake","Barrel":"MIP Light Barrel(Short)","Optic":"","Stock":"No Stock","Rear Grip":"Granulated Grip Tape","Ammunition":"","Underbarrel":"","Laser":"OWC Laser-Tactical","Perk":"","Submitter":"Path.exe","Title":"","Short Description":"","URL":"https://media.discordapp.net/attachments/540218400413188116/856063281978015744/Screenshot_20210620-113641.png?width=1320&height=609","Last Updated":"June 23, 2021"},{"Weapon":"KN-44","Valid":0,"ID":1,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"KN-44","Valid":0,"ID":2,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"KN-44","Valid":0,"ID":3,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"KN-44","Valid":0,"ID":4,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"KN-44","Valid":0,"ID":5,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"KN-44","Valid":0,"ID":6,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"KN-44","Valid":0,"ID":7,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"KN-44","Valid":0,"ID":8,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"KN-44","Valid":0,"ID":9,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"LK24","Valid":1,"ID":0,"Muzzle":"","Barrel":"YKM Integral Suppressor Light","Optic":"","Stock":"No Stock","Rear Grip":"Granulated Grip Tape","Ammunition":"","Underbarrel":"Tactical Foregrip A","Laser":"OWC Laser-Tactical","Perk":"FMJ","Submitter":"Path.exe","Title":"","Short Description":"","URL":"https://media.discordapp.net/attachments/540218400413188116/856063282258509834/Screenshot_20210620-113830.png?width=1320&height=609","Last Updated":"June 23, 2021"},{"Weapon":"LK24","Valid":0,"ID":1,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"LK24","Valid":0,"ID":2,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"LK24","Valid":0,"ID":3,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"LK24","Valid":0,"ID":4,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"LK24","Valid":0,"ID":5,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"LK24","Valid":0,"ID":6,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"LK24","Valid":0,"ID":7,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"LK24","Valid":0,"ID":8,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"LK24","Valid":0,"ID":9,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"M4","Valid":1,"ID":0,"Muzzle":"","Barrel":"YKM Integral Suppressor Light","Optic":"","Stock":"No Stock","Rear Grip":"Granulated Grip Tape","Ammunition":"","Underbarrel":"Tactical Foregrip A","Laser":"OWC Laser-Tactical","Perk":"","Submitter":"Path.exe","Title":"","Short Description":"","URL":"https://media.discordapp.net/attachments/540218400413188116/856063281360535582/Screenshot_20210620-114224.png?width=1320&height=609","Last Updated":"June 23, 2021"},{"Weapon":"M4","Valid":0,"ID":1,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"M4","Valid":0,"ID":2,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"M4","Valid":0,"ID":3,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"M4","Valid":0,"ID":4,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"M4","Valid":0,"ID":5,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"M4","Valid":0,"ID":6,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"M4","Valid":0,"ID":7,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"M4","Valid":0,"ID":8,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"M4","Valid":0,"ID":9,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"M16","Valid":1,"ID":0,"Muzzle":"OWC Light Compensator","Barrel":"","Optic":"Holographic Sight 2","Stock":"","Rear Grip":"Rubberized Grip Tape","Ammunition":"","Underbarrel":"Operator Foregrip","Laser":"OWC Laser-Tactical","Perk":"","Submitter":"Path.exe","Title":"","Short Description":"","URL":"https://images-ext-1.discordapp.net/external/2cYevpZoxTuLufgwG63xrACTOLpEN-1yrf_fSyc-pdU/%3Fwidth%3D937%26height%3D562/https/media.discordapp.net/attachments/772099026195316746/847174281255190568/image4.png","Last Updated":"June 23, 2021"},{"Weapon":"M16","Valid":0,"ID":1,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"M16","Valid":0,"ID":2,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"M16","Valid":0,"ID":3,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"M16","Valid":0,"ID":4,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"M16","Valid":0,"ID":5,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"M16","Valid":0,"ID":6,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"M16","Valid":0,"ID":7,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"M16","Valid":0,"ID":8,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"M16","Valid":0,"ID":9,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Man-O-War","Valid":1,"ID":0,"Muzzle":"","Barrel":"MIP Light Barrel(Short)","Optic":"","Stock":"YKM Combat Stock","Rear Grip":"Granulated Grip Tape","Ammunition":"25 Round Extended Mag","Underbarrel":"","Laser":"OWC Laser-Tactical","Perk":"","Submitter":"Path.exe","Title":"","Short Description":"","URL":"https://images-ext-2.discordapp.net/external/4jMUlyNOK5Rhd8ELwm9-pI8nZQFxs16jg6AxVEnGF7Y/%3Fwidth%3D937%26height%3D562/https/media.discordapp.net/attachments/772099026195316746/847174262841540658/image7.png","Last Updated":"June 23, 2021"},{"Weapon":"Man-O-War","Valid":0,"ID":1,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Man-O-War","Valid":0,"ID":2,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Man-O-War","Valid":0,"ID":3,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Man-O-War","Valid":0,"ID":4,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Man-O-War","Valid":0,"ID":5,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Man-O-War","Valid":0,"ID":6,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Man-O-War","Valid":0,"ID":7,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Man-O-War","Valid":0,"ID":8,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Man-O-War","Valid":0,"ID":9,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Peacekeeper MK2","Valid":1,"ID":0,"Muzzle":"","Barrel":"Taskforce Barrel","Optic":"","Stock":"Agile Stock","Rear Grip":"Firm Grip Tape","Ammunition":"Extended Mag A","Underbarrel":"Field Agent Foregrip","Laser":"","Perk":"","Submitter":"Path.exe","Title":"","Short Description":"","URL":"https://media.discordapp.net/attachments/772099026195316746/847174260522090516/image2.png?width=937&height=562","Last Updated":"June 23, 2021"},{"Weapon":"Peacekeeper MK2","Valid":0,"ID":1,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Peacekeeper MK2","Valid":0,"ID":2,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Peacekeeper MK2","Valid":0,"ID":3,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Peacekeeper MK2","Valid":0,"ID":4,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Peacekeeper MK2","Valid":0,"ID":5,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Peacekeeper MK2","Valid":0,"ID":6,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Peacekeeper MK2","Valid":0,"ID":7,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Peacekeeper MK2","Valid":0,"ID":8,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Peacekeeper MK2","Valid":0,"ID":9,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Type 25","Valid":1,"ID":0,"Muzzle":"","Barrel":"MIP Light Barrel(Short)","Optic":"","Stock":"YKM Light Stock","Rear Grip":"Granulated Grip Tape","Ammunition":"Stopping Power Reload","Underbarrel":"","Laser":"OWC Laser-Tactical","Perk":"","Submitter":"Path.exe","Title":"","Short Description":"","URL":"https://images-ext-2.discordapp.net/external/frQJP-E_j3iL1NQsCvBhsaqeHu3Zt7iHxZNEh1d2YPE/%3Fwidth%3D937%26height%3D562/https/media.discordapp.net/attachments/772099026195316746/847174281698738216/image5.png","Last Updated":"June 23, 2021"},{"Weapon":"Type 25","Valid":0,"ID":1,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Type 25","Valid":0,"ID":2,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Type 25","Valid":0,"ID":3,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Type 25","Valid":0,"ID":4,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Type 25","Valid":0,"ID":5,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Type 25","Valid":0,"ID":6,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Type 25","Valid":0,"ID":7,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Type 25","Valid":0,"ID":8,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"Type 25","Valid":0,"ID":9,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"FR .556","Valid":1,"ID":0,"Muzzle":"","Barrel":"MIP Light Barrel(Short)","Optic":"","Stock":"RTC Steady Stock","Rear Grip":"Granulated Grip Tape","Ammunition":"","Underbarrel":"Tactical Foregrip A","Laser":"OWC Laser-Tactical","Perk":"","Submitter":"Path.exe","Title":"","Short Description":"","URL":"https://images-ext-2.discordapp.net/external/4quPh-O02WlvhpGSiMvD10Ojn9tvSWg1b7-Rehnh6MQ/%3Fwidth%3D937%26height%3D562/https/media.discordapp.net/attachments/772099026195316746/847174260052459540/image1.png","Last Updated":"June 23, 2021"},{"Weapon":"FR .556","Valid":0,"ID":1,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"FR .556","Valid":0,"ID":2,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"FR .556","Valid":0,"ID":3,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"FR .556","Valid":0,"ID":4,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"FR .556","Valid":0,"ID":5,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"FR .556","Valid":0,"ID":6,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"FR .556","Valid":0,"ID":7,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"FR .556","Valid":0,"ID":8,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"FR .556","Valid":0,"ID":9,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"CR-56 AMAX","Valid":1,"ID":0,"Muzzle":"MIP Light Flash Guard","Barrel":"","Optic":"","Stock":"No Stock","Rear Grip":"Granulated Grip Tape","Ammunition":"","Underbarrel":"","Laser":"MIP Laser 5mW","Perk":"Long Shot","Submitter":"Path.exe","Title":"","Short Description":"","URL":"https://media.discordapp.net/attachments/691133003866439701/861891137254326272/brave_8pS8PhHl4P.png?width=1128&height=634","Last Updated":"July 6, 2021"},{"Weapon":"CR-56 AMAX","Valid":1,"ID":1,"Muzzle":"Monolithic Suppressor","Barrel":"MIP Custom Long","Optic":"","Stock":"No Stock","Rear Grip":"","Ammunition":"Extended Mag","Underbarrel":"","Laser":"OWC Laser-Tactical","Perk":"","Submitter":"Jokesta","Title":"","Short Description":"","URL":"","Last Updated":"June 30, 2021"},{"Weapon":"CR-56 AMAX","Valid":0,"ID":2,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"CR-56 AMAX","Valid":0,"ID":3,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"CR-56 AMAX","Valid":0,"ID":4,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"CR-56 AMAX","Valid":0,"ID":5,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"CR-56 AMAX","Valid":0,"ID":6,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"CR-56 AMAX","Valid":0,"ID":7,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"CR-56 AMAX","Valid":0,"ID":8,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""},{"Weapon":"CR-56 AMAX","Valid":0,"ID":9,"Muzzle":"","Barrel":"","Optic":"","Stock":"","Rear Grip":"","Ammunition":"","Underbarrel":"","Laser":"","Perk":"","Submitter":"","Title":"","Short Description":"","URL":"","Last Updated":""}]}
-\ No newline at end of file
diff --git a/util/command-handler.js b/util/command-handler.js
@@ -1,44 +0,0 @@
-const { readdirSync } = require("fs");
-module.exports = client => {
- readdirSync("./commands/").forEach(dir => {
- const commands = readdirSync(`./commands/${dir}/`).filter(file =>
- file.endsWith(".js")
- );
- for (let file of commands) {
- let pull = require(`../commands/${dir}/${file}`);
- if (pull.name) {
- client.commands.set(pull.name, pull);
- } else {
- continue;
- }
- if (pull.aliases && Array.isArray(pull.aliases))
- pull.aliases.forEach(alias => client.aliases.set(alias, pull.name));
- }
- });
- readdirSync("./cat/").forEach(dir => {
- const commands = readdirSync(`./cat/${dir}/`).filter(file =>
- file.endsWith(".js")
- );
- for (let file of commands) {
- let pull = require(`../cat/${dir}/${file}`);
- if (pull.name) {
- client.hide.set(pull.name, pull);
- } else {
- continue;
- }
- }
- });
- readdirSync("./events/").forEach(file => {
- const events = readdirSync("./events/").filter(file =>
- file.endsWith(".js")
- );
- for (let file of events) {
- let pull = require(`../events/${file}`);
- if (pull) {
- client.events.set(file, file);
- } else {
- continue;
- }
- }
- });
-};
diff --git a/util/dist/handler.js b/util/dist/handler.js
@@ -75,8 +75,9 @@ module.exports = async client => {
return [...accumulator, { id: v.id, permissions }];
}, []);
client.guilds.cache.forEach(g =>
- g.commands.permissions.set({ fullPermissions })
+ g.commands.permissions.set({ fullPermissions }).catch(e => null)
);
});
+ //.catch(e => null);
});
};
diff --git a/util/dist/slash.js b/util/dist/slash.js
@@ -189,6 +189,12 @@ module.exports = async (interaction, dir, file, err) => {
case 506:
err = "This server is already premium";
break;
+ case 507:
+ err = "This server isn't premium yet";
+ break;
+ case 508:
+ err = "You didn't make the server premium";
+ break;
case 999:
err = "An unexpected error occured. Please try again.";
break;
diff --git a/util/functions/function.js b/util/functions/function.js
@@ -348,6 +348,56 @@ async function confirmation(message, author, validReactions, time = 60000) {
console.log(e);
}
}
+function selectRandom(array = []) {
+ return array[Math.floor(Math.random() * array.length)];
+}
+function getAllTextFromEmbed(embed) {
+ let text = "";
+ function getTime(now) {
+ const date = new Date(now);
+ const escape = value => `0${value}`.slice(-2);
+ const ampm = date.getHours() >= 12 ? "PM" : "AM";
+
+ return `${date.getMonth()}/${date.getDate()}/${date.getFullYear()} at ${escape(
+ date.getHours()
+ )}:${escape(date.getMinutes())}:${escape(date.getSeconds())}${ampm}`;
+ }
+
+ if (embed.title)
+ text += `**${embed.title
+ .replace(/(https?:\/\/)?discord\.gg\/(\w+)/g, "Invite")
+ .replace(/\[(.*)\]\((.*)\)/g, "Hyper link")}**`;
+ if (embed.description)
+ text += `\n${embed.description
+ .replace(/(https?:\/\/)?discord\.gg\/(\w+)/g, "Invite")
+ .replace(/\[(.*)\]\((.*)\)/g, "Hyper link")}`;
+ if (embed.fields) {
+ text += "\n";
+ for (const field of embed.fields)
+ text += `\n**${field.name
+ .replace(/(https?:\/\/)?discord\.gg\/(\w+)/g, "Invite")
+ .replace(/\[(.*)\]\((.*)\)/g, "Hyper link")}**\n ${field.value
+ .replace(/(https?:\/\/)?discord\.gg\/(\w+)/g, "Invite")
+ .replace(/\[(.*)\]\((.*)\)/g, "Hyper link")}`;
+ }
+ if (embed.footer) {
+ let field = `\n\n**${embed.footer.text
+ .replace(/(https?:\/\/)?discord\.gg\/(\w+)/g, "Invite")
+ .replace(/\[(.*)\]\((.*)\)/g, "Hyper link")}`;
+
+ if (embed.timestamp) {
+ const time =
+ embed.timestamp instanceof Date
+ ? getTime(embed.timestamp.getTime())
+ : embed.timestamp;
+ field += `at ${time}`;
+ }
+
+ text += `${field}**`;
+ }
+
+ return text;
+}
module.exports = {
rndint,
toBool,
@@ -363,4 +413,6 @@ module.exports = {
cooldown,
ms,
confirmation,
+ selectRandom,
+ getAllTextFromEmbed,
};
diff --git a/util/functions/mongoose.js b/util/functions/mongoose.js
@@ -33,6 +33,10 @@ module.exports = {
Welcome,
Goodbye,
Log,
+ Starboard,
+ StarCount,
+ Muterole,
+ Chatbot,
Premium,
Category,
Commands,
@@ -45,6 +49,10 @@ module.exports = {
Welcome,
Goodbye,
Log,
+ Starboard,
+ StarCount,
+ Muterole,
+ Chatbot,
Premium,
Category,
Commands,
@@ -56,6 +64,10 @@ module.exports = {
const Welcome = guild.Welcome;
const Goodbye = guild.Goodbye;
const Log = guild.Log;
+ const Starboard = guild.Starboard;
+ const StarCount = guild.StarCount;
+ const Muterole = guild.Muterole;
+ const Chatbot = guild.Chatbot;
const Premium = guild.Premium;
const Category = guild.Category;
const Commands = guild.Commands;
@@ -66,6 +78,10 @@ module.exports = {
Welcome,
Goodbye,
Log,
+ Starboard,
+ StarCount,
+ Muterole,
+ Chatbot,
Premium,
Category,
Commands,
@@ -204,12 +220,12 @@ module.exports = {
*/
async BK(ID, Toggle, Reason) {
if (!ID) throw new Error("User ID?");
- if (!Toggle) throw new Error("Blacklist Toggle?");
+ //if (!Toggle) throw new Error("Blacklist Toggle?");
if (!Reason) throw new Error("Blacklist Feason?");
const user = await u.findOne({ User: ID });
if (!user) {
const sus = new u({ User: ID });
- if (Toggle == "true") {
+ if (Toggle == true) {
user.Blacklist = true;
user.Blacklist_Reason = Reason;
} else {
@@ -220,7 +236,7 @@ module.exports = {
cachegoose.clearCache();
return { Reason };
} else {
- if (Toggle == "true") {
+ if (Toggle == true) {
user.Blacklist = true;
user.Blacklist_Reason = Reason;
} else {
@@ -371,6 +387,63 @@ module.exports = {
},
/**
* @param {String} ID - Guild ID
+ * @param {String} Role = Role ID
+ */ async setMuterole(ID, Role) {
+ if (!ID) throw new Error("Guild ID?");
+ if (!Role) throw new Error("Role?");
+ const guild = await g.findOne({ Guild: ID });
+ if (!guild) {
+ const newU = new g({ Guild: ID });
+ newU.Muterole = Role;
+ await newU.save().catch(error => console.log(error));
+ return { Role };
+ }
+ guild.Muterole = Role;
+ await guild.save().catch(error => console.log(error));
+ cachegoose.clearCache();
+ return { Role };
+ },
+ /**
+ * @param {String} ID - Guild ID
+ * @param {String} Channel = Channel ID
+ * @param {Number} Count - StarCount
+ */ async setStarboard(ID, Channel, Count) {
+ if (!ID) throw new Error("Guild ID?");
+ if (!Channel) throw new Error("Channel?");
+ const guild = await g.findOne({ Guild: ID });
+ if (!guild) {
+ const newU = new g({ Guild: ID });
+ newU.Starboard = Channel;
+ newU.StarCount = Count;
+ await newU.save().catch(error => console.log(error));
+ return { Channel };
+ }
+ guild.Starboard = Channel;
+ guild.StarCount = Count;
+ await guild.save().catch(error => console.log(error));
+ cachegoose.clearCache();
+ return { Channel };
+ },
+ /**
+ * @param {String} ID - Guild ID
+ * @param {String} Channel = Channel ID
+ */ async setChatbot(ID, Channel) {
+ if (!ID) throw new Error("Guild ID?");
+ if (!Channel) throw new Error("Channel?");
+ const guild = await g.findOne({ Guild: ID });
+ if (!guild) {
+ const newU = new g({ Guild: ID });
+ newU.Chatbot = Channel;
+ await newU.save().catch(error => console.log(error));
+ return { Channel };
+ }
+ guild.Chatbot = Channel;
+ await guild.save().catch(error => console.log(error));
+ cachegoose.clearCache();
+ return { Channel };
+ },
+ /**
+ * @param {String} ID - Guild ID
* @param {String} Toggle - premium Toggle
*/
async setPremium(ID, Toggle) {
diff --git a/util/pagination/pagination.js b/util/pagination/pagination.js
@@ -35,7 +35,7 @@ module.exports = class Util {
((currPage % contents.length) + contents.length) % contents.length;
const embed = msg.embeds[0]
.setDescription(contents[currPage])
- .setFooter(`Page ${currPage + 1} of ${contents.length}.`);
+ .setFooter(`Page ${currPage + 1} of ${contents.length}`);
msg.edit({ embeds: [embed] });
this.pagination(msg, author, contents, false, currPage);
})