This commit is contained in:
NK 2022-10-26 10:38:28 +00:00
parent 6c3223b7f0
commit 36fd3341a7
81 changed files with 1192 additions and 1188 deletions

View file

@ -1,8 +1,10 @@
const { Client, Collection, MessageEmbed } = require("discord.js"); const {
const { Manager } = require("erela.js"); Client,
Collection,
EmbedBuilder,
GatewayIntentBits,
} = require("discord.js");
const config = require("../config"); const config = require("../config");
const Spotify = require("erela.js-spotify");
const utils = require("../util/functions/function");
require("dotenv").config(); require("dotenv").config();
class NYX extends Client { class NYX extends Client {
@ -20,18 +22,17 @@ class NYX extends Client {
}, },
], ],
}, },
shard: "auto", intents: [
restTimeOffset: 0, GatewayIntentBits.Guilds,
restRequestTimeout: 99999, GatewayIntentBits.GuildMembers,
partials: ["MESSAGE", "CHANNEL", "REACTION", "GUILD_MEMBER"], GatewayIntentBits.MessageContent,
intents: 24207, GatewayIntentBits.GuildPresences,
],
} }
) { ) {
super(options); super(options);
this.slashCommands = new Collection(); this.slashCommands = new Collection();
this.hide = new Collection(); this.hide = new Collection();
// this.esnipes = new Collection();
// this.snipes = new Collection();
this.config = config; this.config = config;
this.data = require("../util/functions/mongoose"); this.data = require("../util/functions/mongoose");
this.color = config.color; this.color = config.color;
@ -54,92 +55,30 @@ class NYX extends Client {
"718762019586572341", // NYX Nation "718762019586572341", // NYX Nation
"840225563193114624", // Command Test "840225563193114624", // Command Test
]; ];
const client = this;
} }
// require("../util/functions/economy")(client);
// this.manager = new Manager({
// plugins: [
// new Spotify({
// clientID: process.env.SPOTIFY_ID,
// clientSecret: process.env.SPOTIFY_SECRET,
// }),
// ],
// nodes: [
// {
// host: config.Lavalink.Host,
// port: config.Lavalink.Port,
// password: config.Lavalink.Password,
// retryDelay: 5000,
// },
// ],
// autoPlay: true,
// send: (id, payload) => {
// const guild = client.guilds.cache.get(id);
// if (guild) guild.shard.send(payload);
// },
// })
// .on("nodeConnect", node =>
// console.log(`Node "${node.options.identifier}" has connected`)
// )
// .on("nodeError", (node, error) =>
// console.log(
// `Node "${node.options.identifier}" encountered an error: ${error.message}`
// )
// )
// .on("trackStart", (player, track) => {
// const channel = client.channels.cache.get(player.textChannel);
// const embed = new MessageEmbed()
// .setColor(config.color)
// .setAuthor(
// `Now Playing`,
// "https://cdn.discordapp.com/emojis/897017864085712936.gif"
// )
// .setFooter(`Made by ${client.author}`, client.user.displayAvatarURL())
// .setTimestamp()
// .setThumbnail(player.queue.current.displayThumbnail())
// .setDescription(`[${track.title}](${track.uri})`)
// .addField(
// "Duration",
// `\`${utils.prettyMs(track.duration, {
// colonNotation: true,
// })}\``,
// true
// );
// channel.send({ embeds: [embed] });
// })
// .on("queueEnd", player => {
// const channel = client.channels.cache.get(player.textChannel);
// const embed2 = new MessageEmbed()
// .setColor(config.color)
// .setAuthor(
// `Queue has ended`,
// "https://cdn.discordapp.com/emojis/897017864085712936.gif"
// )
// .setFooter(`Made by ${client.author}`, client.user.displayAvatarURL())
// .setTimestamp();
// channel.send({ embeds: [embed2] });
// // player.destroy(); Remove if 24/7
// });
// }
start() { start() {
require("../util/dist/handler")(this); require("../util/dist/handler")(this);
this.login(process.env.TOKEN);
this.data this.data
.connect(process.env.MONGO) .connect(process.env.MONGO)
.then(() => console.log("Connected to MongoDB ✅")) .then(() => console.log("Connected to MongoDB ✅"))
.catch(e => console.log(e)); .catch(e => console.log(e));
this.login(process.env.TOKEN);
} }
err(c, e) { err(c, e) {
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setTitle("An Error Occured") .setTitle("An Error Occured")
.setColor("RED") .setColor("RED")
.setDescription(`❌ | ${e}`) .setDescription(`❌ | ${e}`)
.setTimestamp() .setTimestamp()
.setFooter(`Made by ${this.author}`, this.user.displayAvatarURL()); .setFooter({
text: `Made by ${this.author}`,
iconURL: this.user.displayAvatarURL(),
});
c.followUp({ embeds: [embed] }); c.followUp({ embeds: [embed] });
} }
se(c, e) { se(c, e) {
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setColor(this.color) .setColor(this.color)
.setDescription(e) .setDescription(e)
.setTimestamp(); .setTimestamp();

View file

@ -1,10 +1,9 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
module.exports = { module.exports = {
name: "sensitivity", name: "sensitivity",
description: "Get the perfect sensitivity for APEXM", description: "Get the perfect sensitivity for APEXM",
category: "APEX", category: "APEX",
usage: "[Ironsight Sensitivity]", usage: "[Ironsight Sensitivity]",
type: "CHAT_INPUT",
options: [ options: [
{ {
type: 3, type: 3,
@ -15,7 +14,7 @@ module.exports = {
], ],
run: async (client, interaction, args) => { run: async (client, interaction, args) => {
if (args[0] > 0 && args[0] < 301) { if (args[0] > 0 && args[0] < 301) {
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setTitle(`Apex Legends Mobile Sensitivity Calculator`) .setTitle(`Apex Legends Mobile Sensitivity Calculator`)
.setDescription( .setDescription(
`<:nyx_description:897379659665264650> For more info, follow this [Video guide](https://rebrand.ly/apexm-sens) by HawksNest.` `<:nyx_description:897379659665264650> For more info, follow this [Video guide](https://rebrand.ly/apexm-sens) by HawksNest.`
@ -39,12 +38,12 @@ module.exports = {
{ {
name: "Scope Sensitivity", name: "Scope Sensitivity",
value: ` value: `
2x Scope ADS - \`${args[0] * 0.5 }\` 2x Scope ADS - \`${args[0] * 0.5}\`
3x Scope ADS - \`${args[0] * 0.33}\` 3x Scope ADS - \`${args[0] * 0.33}\`
4x Scope ADS - \`${args[0] * 0.25}\` 4x Scope ADS - \`${args[0] * 0.25}\`
6x Scope ADS - \`${args[0] * 0.16}\` 6x Scope ADS - \`${args[0] * 0.16}\`
8x Scope ADS - \`${args[0] * 0.12}\` 8x Scope ADS - \`${args[0] * 0.12}\`
10x Scope ADS - \`${args[0] * 0.10}\``, 10x Scope ADS - \`${args[0] * 0.1}\``,
inline: false, inline: false,
} }
) )
@ -53,7 +52,7 @@ module.exports = {
embeds: [embed], embeds: [embed],
}); });
} else { } else {
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setDescription(`⚠ **ERROR:** The Sensitivity can be betweeen 0 & 300`) .setDescription(`⚠ **ERROR:** The Sensitivity can be betweeen 0 & 300`)
.setColor(client.color); .setColor(client.color);
interaction.followUp({ embeds: [embed] }); interaction.followUp({ embeds: [embed] });

View file

@ -1,15 +1,14 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
const moment = require("moment"); const moment = require("moment");
const axios = require("axios"); const axios = require("axios");
module.exports = { module.exports = {
name: "build", name: "build",
description: "Get gunsmith builds", description: "Get gunsmith builds",
usage: "[Weapon Name] [Author] [Tag]", usage: "[Weapon Name] [Author] [Tag]",
type: "CHAT_INPUT",
category: "CODM", category: "CODM",
options: [ options: [
{ {
type: "SUB_COMMAND", type: 1,
name: "assault_rifle", name: "assault_rifle",
description: "Get a gunsmith build for a Assault Rifle", description: "Get a gunsmith build for a Assault Rifle",
options: [ options: [
@ -152,7 +151,7 @@ module.exports = {
], ],
}, },
{ {
type: "SUB_COMMAND", type: 1,
name: "sub_machine_gun", name: "sub_machine_gun",
description: "Get a gunsmith build for a Sub Machine Gun", description: "Get a gunsmith build for a Sub Machine Gun",
options: [ options: [
@ -275,7 +274,7 @@ module.exports = {
], ],
}, },
{ {
type: "SUB_COMMAND", type: 1,
name: "sniper_rifle", name: "sniper_rifle",
description: "Get a gunsmith build for a Sniper Rifle", description: "Get a gunsmith build for a Sniper Rifle",
options: [ options: [
@ -362,7 +361,7 @@ module.exports = {
], ],
}, },
{ {
type: "SUB_COMMAND", type: 1,
name: "light_machine_gun", name: "light_machine_gun",
description: "Get a gunsmith build for a Light Machine Gun", description: "Get a gunsmith build for a Light Machine Gun",
options: [ options: [
@ -445,7 +444,7 @@ module.exports = {
], ],
}, },
{ {
type: "SUB_COMMAND", type: 1,
name: "shotgun", name: "shotgun",
description: "Get a gunsmith build for a Shotgun", description: "Get a gunsmith build for a Shotgun",
options: [ options: [
@ -524,7 +523,7 @@ module.exports = {
], ],
}, },
{ {
type: "SUB_COMMAND", type: 1,
name: "marksman_rifle", name: "marksman_rifle",
description: "Get a gunsmith build for a Marksman Rifle", description: "Get a gunsmith build for a Marksman Rifle",
options: [ options: [
@ -591,7 +590,7 @@ module.exports = {
], ],
}, },
{ {
type: "SUB_COMMAND", type: 1,
name: "pistol", name: "pistol",
description: "Get a gunsmith build for a Pistol", description: "Get a gunsmith build for a Pistol",
options: [ options: [
@ -674,7 +673,7 @@ module.exports = {
.then(res => res.data) .then(res => res.data)
.catch(e => null); .catch(e => null);
if (!data?.cwts) { if (!data?.cwts) {
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setDescription( .setDescription(
`<:nyx_not_available:897378400031879188> We don't have a **${tag}** gunsmith build for the gun with **CWTS 🆔 ${cwts}** by **${cc}**, Please try another tag or a differnt content creator` `<:nyx_not_available:897378400031879188> We don't have a **${tag}** gunsmith build for the gun with **CWTS 🆔 ${cwts}** by **${cc}**, Please try another tag or a differnt content creator`
) )
@ -685,7 +684,7 @@ module.exports = {
data.attachments.map((e, i) => { data.attachments.map((e, i) => {
return arr.push(`**${i + 1}:** ${e}`); return arr.push(`**${i + 1}:** ${e}`);
}); });
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setTitle(`${tag} build for ${data.weaponName} from ${data.author}`) .setTitle(`${tag} build for ${data.weaponName} from ${data.author}`)
.setDescription( .setDescription(
`<:nyx_description:897379659665264650> **Description** \`\`\`\n${data.notes}\n \`\`\`` `<:nyx_description:897379659665264650> **Description** \`\`\`\n${data.notes}\n \`\`\``

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
const model = require("../../models/weapons"); const model = require("../../models/weapons");
const Attachments = require("../../util/Data/attachments.json"); const Attachments = require("../../util/Data/attachments.json");
module.exports = { module.exports = {
@ -22,7 +22,7 @@ module.exports = {
slot_3 = slots.next().value, slot_3 = slots.next().value,
slot_4 = slots.next().value, slot_4 = slots.next().value,
slot_5 = slots.next().value; slot_5 = slots.next().value;
const result = new MessageEmbed() const result = new EmbedBuilder()
.setColor(client.color) .setColor(client.color)
.setTitle(`🎲 A Randomly Generated Class for ${primary_weapon} 🎲`) .setTitle(`🎲 A Randomly Generated Class for ${primary_weapon} 🎲`)
.setDescription( .setDescription(
@ -38,7 +38,10 @@ module.exports = {
)}**` )}**`
) )
.setURL(client.web) .setURL(client.web)
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp(); .setTimestamp();
interaction.followUp({ embeds: [result] }); interaction.followUp({ embeds: [result] });
function* shuffle(array) { function* shuffle(array) {

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js"); //@night0721 You need to make this const { EmbedBuilder } = require("discord.js"); //@night0721 You need to make this
const items = require("../../util/Data/loadout.json"); const items = require("../../util/Data/loadout.json");
module.exports = { module.exports = {
name: "loadout", name: "loadout",
@ -18,7 +18,7 @@ module.exports = {
const slot_1 = slots.next().value, const slot_1 = slots.next().value,
slot_2 = slots.next().value, slot_2 = slots.next().value,
slot_3 = slots.next().value; slot_3 = slots.next().value;
const result = new MessageEmbed() const result = new EmbedBuilder()
.setColor(client.color) .setColor(client.color)
.setFooter({ .setFooter({
text: `Made by ${client.author}`, text: `Made by ${client.author}`,

View file

@ -1,14 +1,14 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
const c = require("../../client/CODMClient"); const c = require("../../client/CODMClient");
module.exports = { module.exports = {
name: "perk", name: "perk",
description: "Get perk stats", description: "Get perk stats",
type: "CHAT_INPUT",
usage: "{Perk}", usage: "{Perk}",
category: "CODM", category: "CODM",
options: [ options: [
{ {
type: "SUB_COMMAND", type: 1,
name: "red", name: "red",
description: "Red Perk", description: "Red Perk",
options: [ options: [
@ -67,7 +67,7 @@ module.exports = {
], ],
}, },
{ {
type: "SUB_COMMAND", type: 1,
name: "green", name: "green",
description: "Green Perk", description: "Green Perk",
options: [ options: [
@ -122,7 +122,7 @@ module.exports = {
], ],
}, },
{ {
type: "SUB_COMMAND", type: 1,
name: "blue", name: "blue",
description: "Blue Perk", description: "Blue Perk",
options: [ options: [
@ -176,7 +176,7 @@ module.exports = {
run: async (client, interaction, args) => { run: async (client, interaction, args) => {
const val = args[1]; const val = args[1];
const d = await c.getperk(val); const d = await c.getperk(val);
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setColor( .setColor(
d.type == "green" d.type == "green"
? "09654a" ? "09654a"
@ -186,7 +186,10 @@ module.exports = {
? "1047a4" ? "1047a4"
: client.color : client.color
) )
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp() .setTimestamp()
.setTitle(d.perk) .setTitle(d.perk)
.addField("Effects", d.effects); .addField("Effects", d.effects);

View file

@ -1,14 +1,14 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
const c = require("../../client/CODMClient"); const c = require("../../client/CODMClient");
module.exports = { module.exports = {
name: "scorestreak", name: "scorestreak",
description: "Get Scorestreak stats", description: "Get Scorestreak stats",
type: "CHAT_INPUT",
usage: "{Scorestreak}", usage: "{Scorestreak}",
category: "CODM", category: "CODM",
options: [ options: [
{ {
type: "SUB_COMMAND", type: 1,
name: "lethal", name: "lethal",
description: "Lethal Scorestreak", description: "Lethal Scorestreak",
options: [ options: [
@ -83,7 +83,7 @@ module.exports = {
], ],
}, },
{ {
type: "SUB_COMMAND", type: 1,
name: "support", name: "support",
description: "Support Scorestreak", description: "Support Scorestreak",
options: [ options: [
@ -129,7 +129,7 @@ module.exports = {
run: async (client, interaction, args) => { run: async (client, interaction, args) => {
const val = args[1]; const val = args[1];
const d = await c.getscorestreak(val); const d = await c.getscorestreak(val);
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setTitle(d.name) .setTitle(d.name)
.setURL(d.preview_video) .setURL(d.preview_video)
.setDescription( .setDescription(

View file

@ -1,6 +1,6 @@
const common = require("../../util/functions/common"); const common = require("../../util/functions/common");
const data = require("../../util/Data/data.json"); const data = require("../../util/Data/data.json");
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
let currGun, let currGun,
currStats, currStats,
@ -71,7 +71,7 @@ module.exports = {
const recoilImageLink = await chart.getShortUrl(); const recoilImageLink = await chart.getShortUrl();
repEmb.image = { url: recoilImageLink }; repEmb.image = { url: recoilImageLink };
} }
interaction.followUp({ embeds: [new MessageEmbed(repEmb)] }); interaction.followUp({ embeds: [new EmbedBuilder(repEmb)] });
} }
}, },
}; };

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
module.exports = { module.exports = {
name: "premiumserver", name: "premiumserver",
category: "Config", category: "Config",
@ -38,12 +38,12 @@ module.exports = {
); );
interaction.followUp({ interaction.followUp({
embeds: [ embeds: [
new MessageEmbed() new EmbedBuilder()
.setTitle("Success!") .setTitle("Success!")
.setDescription( .setDescription(
`Premium added to **${interaction.guild.name}**! \n` `Premium added to **${interaction.guild.name}**! \n`
) )
.setFooter("Thank you for supporting Cath!") .setFooter({ text: "Thank you for supporting Cath!" })
.setColor("GREEN") .setColor("GREEN")
.setTimestamp() .setTimestamp()
.setAuthor( .setAuthor(
@ -54,7 +54,7 @@ module.exports = {
}); });
client.channels.cache.get(client.config.ServerLog).send({ client.channels.cache.get(client.config.ServerLog).send({
embeds: [ embeds: [
new MessageEmbed() new EmbedBuilder()
.setTitle("New Premium Server") .setTitle("New Premium Server")
.addField( .addField(
"Server Info", "Server Info",
@ -86,7 +86,7 @@ module.exports = {
); );
interaction.followUp({ interaction.followUp({
embeds: [ embeds: [
new MessageEmbed() new EmbedBuilder()
.setTitle("Removed!") .setTitle("Removed!")
.setDescription( .setDescription(
`Premium removed from **${interaction.guild.name}**! \n` `Premium removed from **${interaction.guild.name}**! \n`
@ -101,7 +101,7 @@ module.exports = {
}); });
client.channels.cache.get(client.config.ServerLog).send({ client.channels.cache.get(client.config.ServerLog).send({
embeds: [ embeds: [
new MessageEmbed() new EmbedBuilder()
.setTitle("Premium Server Removed") .setTitle("Premium Server Removed")
.addField( .addField(
"Server Info", "Server Info",

View file

@ -1,5 +1,4 @@
const starboardClient = require("../../client/StarboardClient"); const { EmbedBuilder } = require("discord.js");
const { MessageEmbed } = require("discord.js");
const fs = require("fs"); const fs = require("fs");
module.exports = { module.exports = {
name: "settings", name: "settings",
@ -8,7 +7,7 @@ module.exports = {
category: "Config", category: "Config",
options: [ options: [
{ {
type: "SUB_COMMAND", type: 1,
name: "muterole", name: "muterole",
description: "Configure mute role settings for the server", description: "Configure mute role settings for the server",
options: [ options: [
@ -21,7 +20,7 @@ module.exports = {
], ],
}, },
{ {
type: "SUB_COMMAND", type: 1,
name: "prefix", name: "prefix",
description: "Configure prefix settings for the server", description: "Configure prefix settings for the server",
options: [ options: [
@ -35,7 +34,7 @@ module.exports = {
], ],
}, },
{ {
type: "SUB_COMMAND", type: 1,
name: "welcome", name: "welcome",
description: "Configure welcome channel settings for the server", description: "Configure welcome channel settings for the server",
options: [ options: [
@ -44,12 +43,12 @@ module.exports = {
name: "channel", name: "channel",
description: "The channel for welcome messages", description: "The channel for welcome messages",
required: true, required: true,
channelTypes: ["GUILD_TEXT"], channelTypes: [0],
}, },
], ],
}, },
{ {
type: "SUB_COMMAND", type: 1,
name: "goodbye", name: "goodbye",
description: "Configure goodbye channel settings for the server", description: "Configure goodbye channel settings for the server",
options: [ options: [
@ -58,32 +57,12 @@ module.exports = {
name: "channel", name: "channel",
description: "The channel for goodbye messages", description: "The channel for goodbye messages",
required: true, required: true,
channelTypes: ["GUILD_TEXT"], channelTypes: [0],
}, },
], ],
}, },
{ {
type: "SUB_COMMAND", type: 1,
name: "starboard",
description: "Configure starboard channel settings for the server",
options: [
{
type: 7,
name: "channel",
description: "The channel for starboard messages",
required: true,
channelTypes: ["GUILD_TEXT"],
},
{
type: 4,
name: "starcount",
description: "The required amount of star to trigger the starboard",
required: true,
},
],
},
{
type: "SUB_COMMAND",
name: "chatbot", name: "chatbot",
description: "Configure chatbot channel settings for the server", description: "Configure chatbot channel settings for the server",
options: [ options: [
@ -92,12 +71,12 @@ module.exports = {
name: "channel", name: "channel",
description: "The channel for chatbotmessages", description: "The channel for chatbotmessages",
required: true, required: true,
channelTypes: ["GUILD_TEXT"], channelTypes: [0],
}, },
], ],
}, },
{ {
type: "SUB_COMMAND", type: 1,
name: "log", name: "log",
description: "Configure log channel settings for the server", description: "Configure log channel settings for the server",
options: [ options: [
@ -106,7 +85,7 @@ module.exports = {
name: "channel", name: "channel",
description: "The channel for log messages", description: "The channel for log messages",
required: true, required: true,
channelTypes: ["GUILD_TEXT"], channelTypes: [0],
}, },
], ],
}, },
@ -116,7 +95,7 @@ module.exports = {
description: "Enable commands/category for the server", description: "Enable commands/category for the server",
options: [ options: [
{ {
type: "SUB_COMMAND", type: 1,
name: "command", name: "command",
description: "To enable commands", description: "To enable commands",
options: [ options: [
@ -129,7 +108,7 @@ module.exports = {
], ],
}, },
{ {
type: "SUB_COMMAND", type: 1,
name: "category", name: "category",
description: "To enable categories", description: "To enable categories",
options: [ options: [
@ -179,7 +158,7 @@ module.exports = {
description: "Disable commands/category for the server", description: "Disable commands/category for the server",
options: [ options: [
{ {
type: "SUB_COMMAND", type: 1,
name: "command", name: "command",
description: "To disable commands", description: "To disable commands",
options: [ options: [
@ -192,7 +171,7 @@ module.exports = {
], ],
}, },
{ {
type: "SUB_COMMAND", type: 1,
name: "category", name: "category",
description: "To disable categories", description: "To disable categories",
options: [ options: [
@ -237,7 +216,7 @@ module.exports = {
], ],
}, },
{ {
type: "SUB_COMMAND", type: 1,
name: "level", name: "level",
description: "Configure level settings for the server", description: "Configure level settings for the server",
options: [ options: [
@ -250,7 +229,7 @@ module.exports = {
], ],
}, },
{ {
type: "SUB_COMMAND", type: 1,
name: "nsfw", name: "nsfw",
description: "Configure nsfw settings for the server", description: "Configure nsfw settings for the server",
options: [ options: [
@ -263,7 +242,7 @@ module.exports = {
], ],
}, },
{ {
type: "SUB_COMMAND", type: 1,
name: "tips", name: "tips",
description: "Configure tips settings for the server", description: "Configure tips settings for the server",
options: [ options: [
@ -276,7 +255,7 @@ module.exports = {
], ],
}, },
{ {
type: "SUB_COMMAND", type: 1,
name: "overall", name: "overall",
description: "See overall settings for the server", description: "See overall settings for the server",
options: [], options: [],
@ -316,23 +295,6 @@ module.exports = {
content: `Saved **${channel}** as the goodbye channel`, 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") { } else if (args[0].toLowerCase() === "chatbot") {
const channel = interaction.guild.channels.cache.get(args[1]); const channel = interaction.guild.channels.cache.get(args[1]);
if (channel.type !== "GUILD_TEXT") { if (channel.type !== "GUILD_TEXT") {
@ -500,11 +462,6 @@ module.exports = {
? interaction.guild.channels.cache.get(data.Guild.Goodbye) ? interaction.guild.channels.cache.get(data.Guild.Goodbye)
: "None" : "None"
} }
**Starboard Channel**: ${
interaction.guild.channels.cache.get(data.Guild.Starboard)
? interaction.guild.channels.cache.get(data.Guild.Starboard)
: "None"
}
**Chatbot Channel**: ${ **Chatbot Channel**: ${
interaction.guild.channels.cache.get(data.Guild.Chatbot) interaction.guild.channels.cache.get(data.Guild.Chatbot)
? interaction.guild.channels.cache.get(data.Guild.Chatbot) ? interaction.guild.channels.cache.get(data.Guild.Chatbot)
@ -525,10 +482,13 @@ module.exports = {
data.Guild.Category.length ? data.Guilds.Category.join(",") : "None" data.Guild.Category.length ? data.Guilds.Category.join(",") : "None"
} }
`; `;
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setTitle(`**${interaction.guild.name}** Settings`) .setTitle(`**${interaction.guild.name}** Settings`)
.setColor(client.color) .setColor(client.color)
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp() .setTimestamp()
.setDescription(d); .setDescription(d);
interaction.followUp({ embeds: [embed] }); interaction.followUp({ embeds: [embed] });

View file

@ -1,8 +1,8 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
module.exports = { module.exports = {
name: "avatar", name: "avatar",
description: "Show user's avatar in different formats", description: "Show user's avatar in different formats",
type: "CHAT_INPUT",
usage: "{User}", usage: "{User}",
category: "Information", category: "Information",
options: [ options: [
@ -16,7 +16,7 @@ module.exports = {
run: async (client, interaction, args) => { run: async (client, interaction, args) => {
const member = const member =
interaction.guild.members.cache.get(args[0]) || interaction.member; interaction.guild.members.cache.get(args[0]) || interaction.member;
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setAuthor({ .setAuthor({
name: member.user.tag, name: member.user.tag,
iconURL: member.user.displayAvatarURL({ dynamic: true, size: 1024 }), iconURL: member.user.displayAvatarURL({ dynamic: true, size: 1024 }),

View file

@ -1,13 +1,13 @@
const { MessageEmbed, version: djsversion } = require("discord.js"); const { EmbedBuilder, version: djsversion } = require("discord.js");
const version = require("../../package.json").version; const version = require("../../package.json").version;
const { utc } = require("moment"); const { utc } = require("moment");
module.exports = { module.exports = {
name: "botinfo", name: "botinfo",
description: "Check the info of the bot", description: "Check the info of the bot",
category: "Information", category: "Information",
type: "CHAT_INPUT",
run: async (client, interaction) => { run: async (client, interaction) => {
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setTitle(`NYX - CODM Gunsmith Bot`) .setTitle(`NYX - CODM Gunsmith Bot`)
.setURL( .setURL(
`https://discord.com/api/oauth2/authorize?client_id=${client.user.id}&permissions=4231314550&scope=bot%20applications.commands` `https://discord.com/api/oauth2/authorize?client_id=${client.user.id}&permissions=4231314550&scope=bot%20applications.commands`

View file

@ -44,7 +44,7 @@ module.exports = {
commands: getCmds, commands: getCmds,
}; };
}); });
const embed = new Discord.MessageEmbed() const embed = new Discord.EmbedBuilder()
.setTitle(`**NYX's Commands**`) .setTitle(`**NYX's Commands**`)
.setDescription(`Please choose a category in the dropdown menu`) .setDescription(`Please choose a category in the dropdown menu`)
.setColor(client.color) .setColor(client.color)
@ -116,7 +116,7 @@ module.exports = {
collector.on("collect", async interaction => { collector.on("collect", async interaction => {
const [directory] = interaction.values; const [directory] = interaction.values;
const category = categories.find(u => u.directory === directory); const category = categories.find(u => u.directory === directory);
const newembed = new Discord.MessageEmbed() const newembed = new Discord.EmbedBuilder()
.setTitle( .setTitle(
`${emoji[directory]} ${directory} Commands ${emoji[directory]}` `${emoji[directory]} ${directory} Commands ${emoji[directory]}`
) )
@ -164,7 +164,7 @@ module.exports = {
.map(y => y[0] + y.substring(1, y.length).toLowerCase()) .map(y => y[0] + y.substring(1, y.length).toLowerCase())
.join(" ") .join(" ")
).join(", "); ).join(", ");
const embed = new Discord.MessageEmbed() const embed = new Discord.EmbedBuilder()
.setTitle(`"${command.name}" command details`) .setTitle(`"${command.name}" command details`)
.addField( .addField(
"**Command**:", "**Command**:",

View file

@ -1,31 +1,34 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
module.exports = { module.exports = {
name: "ping", name: "ping",
description: "Check bot latency to Discord API", description: "Check bot latency to Discord API",
type: "CHAT_INPUT",
category: "Information", category: "Information",
run: async (client, interaction, args) => { run: async (client, interaction, args) => {
const msg = await interaction.channel.send(`Pinging...`); const msg = await interaction.channel.send(`Pinging...`);
const messageping = msg.createdTimestamp - interaction.createdTimestamp; const messageping = msg.createdTimestamp - interaction.createdTimestamp;
await msg.delete(); await msg.delete();
const Embed = new MessageEmbed() const Embed = new EmbedBuilder()
.setTitle("<a:pong:897383314405605436> Pong!") .setTitle("<a:pong:897383314405605436> Pong!")
.setAuthor( .setAuthor({
`${interaction.user.username}`, name: `${interaction.user.username}`,
interaction.user.displayAvatarURL() iconURL: interaction.user.displayAvatarURL(),
) })
.setDescription( .setDescription(
`\n 📨 • **Message Latency** \`${Math.floor(messageping)}ms\` `\n 📨 • **Message Latency** \`${Math.floor(messageping)}ms\`
\n🛰 **Bot Latency** \`${Math.round(client.ws.ping)}ms\`` \n🛰 **Bot Latency** \`${Math.round(client.ws.ping)}ms\``
) )
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp() .setTimestamp()
.setColor( .setColor(
messageping < 350 messageping < 350
? "GREEN" ? "#008000"
: messageping < 500 && messageping > 350 : messageping < 500 && messageping > 350
? "YELLOW" ? "#ffff31"
: "RED" : "#ff0000"
); );
interaction.followUp({ embeds: [Embed] }); interaction.followUp({ embeds: [Embed] });
}, },

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
const moment = require("moment"); const moment = require("moment");
module.exports = { module.exports = {
@ -14,7 +14,7 @@ module.exports = {
required: false, required: false,
}, },
], ],
type: "CHAT_INPUT",
run: async (client, interaction, args, utils) => { run: async (client, interaction, args, utils) => {
const member = const member =
interaction.guild.members.cache.get(args[0]) || interaction.member; interaction.guild.members.cache.get(args[0]) || interaction.member;
@ -81,7 +81,7 @@ module.exports = {
// ) { // ) {
// activities = "None"; // activities = "None";
// } else activities = "None"; // } else activities = "None";
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setAuthor( .setAuthor(
member.user.tag, member.user.tag,
member.user.displayAvatarURL({ dynamic: true, size: 2048 }) member.user.displayAvatarURL({ dynamic: true, size: 2048 })
@ -89,7 +89,10 @@ module.exports = {
.setTimestamp() .setTimestamp()
.setColor(member.displayHexColor || client.color) .setColor(member.displayHexColor || client.color)
.setURL(client.web) .setURL(client.web)
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setThumbnail(member.user.displayAvatarURL({ dynamic: true, size: 512 })) .setThumbnail(member.user.displayAvatarURL({ dynamic: true, size: 512 }))
.setColor(member.displayHexColor || client.color) .setColor(member.displayHexColor || client.color)
.addField( .addField(

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
module.exports = { module.exports = {
name: "accept", name: "accept",
category: "Owner", category: "Owner",
@ -29,7 +29,7 @@ module.exports = {
); );
const suggestEmbed = await suggestionChannel.messages.fetch(MessageID); const suggestEmbed = await suggestionChannel.messages.fetch(MessageID);
const data = suggestEmbed.embeds[0]; const data = suggestEmbed.embeds[0];
const acceptEmbed = new MessageEmbed() const acceptEmbed = new EmbedBuilder()
.setAuthor(data.author.name, data.author.iconURL) .setAuthor(data.author.name, data.author.iconURL)
.setDescription(data.description) .setDescription(data.description)
.setColor("GREEN") .setColor("GREEN")

View file

@ -30,7 +30,7 @@ module.exports = {
const reason = interaction.options.getString("reason"); const reason = interaction.options.getString("reason");
if (toggle === true) { if (toggle === true) {
await client.data.BK(user.id, toggle, reason); await client.data.BK(user.id, toggle, reason);
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setTitle( .setTitle(
"<a:nyx_checkmark:897240322411724841> Successfully Blacklisted" "<a:nyx_checkmark:897240322411724841> Successfully Blacklisted"
) )
@ -39,19 +39,25 @@ module.exports = {
) )
.setURL(client.web) .setURL(client.web)
.setColor(client.color) .setColor(client.color)
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp(); .setTimestamp();
interaction.followUp({ embeds: [embed] }); interaction.followUp({ embeds: [embed] });
} else { } else {
await client.data.BK(user.id, toggle, reason); await client.data.BK(user.id, toggle, reason);
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setTitle("<a:nyx_checkmark:897240322411724841> Removed From Blacklist") .setTitle("<a:nyx_checkmark:897240322411724841> Removed From Blacklist")
.setDescription( .setDescription(
`**User:** ${user.user.tag} \`(${user.id})\`\n**Reason:** ${reason} \n**Whitelisted by:** ${interaction.member}` `**User:** ${user.user.tag} \`(${user.id})\`\n**Reason:** ${reason} \n**Whitelisted by:** ${interaction.member}`
) )
.setURL(client.web) .setURL(client.web)
.setColor(client.color) .setColor(client.color)
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp(); .setTimestamp();
interaction.followUp({ embeds: [embed] }); interaction.followUp({ embeds: [embed] });
} }

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
module.exports = { module.exports = {
name: "deny", name: "deny",
category: "Owner", category: "Owner",
@ -28,7 +28,7 @@ module.exports = {
); );
const suggestEmbed = await suggestionChannel.messages.fetch(MessageID); const suggestEmbed = await suggestionChannel.messages.fetch(MessageID);
const data = suggestEmbed.embeds[0]; const data = suggestEmbed.embeds[0];
const denyEmbed = new MessageEmbed() const denyEmbed = new EmbedBuilder()
.setAuthor(data.author.name, data.author.iconURL) .setAuthor(data.author.name, data.author.iconURL)
.setDescription(data.description) .setDescription(data.description)
.setColor("RED") .setColor("RED")

View file

@ -5,7 +5,7 @@ module.exports = {
usage: "(Code)", usage: "(Code)",
Owner: true, Owner: true,
description: "Eval something", description: "Eval something",
type: "CHAT_INPUT",
options: [ options: [
{ {
type: 3, type: 3,
@ -52,7 +52,7 @@ module.exports = {
console.log(evaled); console.log(evaled);
let reactions = ["❌", "⏪", "◀️", "⏹️", "▶️", "⏩"], let reactions = ["❌", "⏪", "◀️", "⏹️", "▶️", "⏩"],
page = 0, page = 0,
evaledEmbed = new Discord.MessageEmbed() evaledEmbed = new Discord.EmbedBuilder()
.setColor(client.color) .setColor(client.color)
.setDescription(`\`\`\`js\n${evaled[0]}\n\`\`\``) .setDescription(`\`\`\`js\n${evaled[0]}\n\`\`\``)
.setTimestamp() .setTimestamp()
@ -113,7 +113,7 @@ module.exports = {
page = evaled.length - 1; page = evaled.length - 1;
break; break;
} }
evaledEmbed = new Discord.MessageEmbed() evaledEmbed = new Discord.EmbedBuilder()
.setColor(interaction.guild.me.displayColor) .setColor(interaction.guild.me.displayColor)
.setDescription(`\`\`\`js\n${evaled[page]}\n\`\`\``); .setDescription(`\`\`\`js\n${evaled[page]}\n\`\`\``);
await mainMessage.edit({ await mainMessage.edit({

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
module.exports = { module.exports = {
name: "guilds", name: "guilds",
category: "Owner", category: "Owner",
@ -15,7 +15,7 @@ module.exports = {
} members`; } members`;
}) })
.join("\n"); .join("\n");
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setTitle("Guilds") .setTitle("Guilds")
.setDescription(description) .setDescription(description)
.setColor(client.color) .setColor(client.color)
@ -31,7 +31,10 @@ module.exports = {
inline: true, inline: true,
} }
) )
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp(); .setTimestamp();
interaction.followUp({ embeds: [embed] }); interaction.followUp({ embeds: [embed] });
}, },

View file

@ -1,13 +1,16 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
module.exports = { module.exports = {
name: "invite", name: "invite",
description: "Get bot invite link or get support", description: "Get bot invite link or get support",
category: "Utilities", category: "Utilities",
type: "CHAT_INPUT",
run: async (client, interaction, args, utils) => { run: async (client, interaction, args, utils) => {
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setColor(client.color) .setColor(client.color)
.setTimestamp() .setTimestamp()
.setAuthor({ .setAuthor({

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
module.exports = { module.exports = {
name: "poll", name: "poll",
category: "Utilities", category: "Utilities",
@ -48,7 +48,7 @@ module.exports = {
}, },
], ],
run: async (client, interaction, args) => { run: async (client, interaction, args) => {
const pollCreateEmbed = new MessageEmbed() const pollCreateEmbed = new EmbedBuilder()
.setTitle(`📣 **${args[0]}**`) .setTitle(`📣 **${args[0]}**`)
.setColor("RED") .setColor("RED")
.setFooter({ .setFooter({

View file

@ -1,10 +1,10 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
module.exports = { module.exports = {
name: "report", name: "report",
description: "Report a bug of the bot", description: "Report a bug of the bot",
category: "Utilities", category: "Utilities",
type: "CHAT_INPUT",
options: [ options: [
{ {
type: 3, type: 3,
@ -17,12 +17,15 @@ module.exports = {
const bug = args[0]; const bug = args[0];
interaction.followUp({ interaction.followUp({
embeds: [ embeds: [
new MessageEmbed() new EmbedBuilder()
.setTitle("SUCCESS!") .setTitle("SUCCESS!")
.setDescription( .setDescription(
"You have reported a bug.\nPlease wait for us to solve it" "You have reported a bug.\nPlease wait for us to solve it"
) )
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp() .setTimestamp()
.setColor("GREEN"), .setColor("GREEN"),
], ],
@ -30,7 +33,7 @@ module.exports = {
const ch = client.channels.cache.get(client.config.Report); const ch = client.channels.cache.get(client.config.Report);
ch.send({ ch.send({
embeds: [ embeds: [
new MessageEmbed() new EmbedBuilder()
.setAuthor( .setAuthor(
interaction.user.tag, interaction.user.tag,
interaction.user.displayAvatarURL({ dynamic: true }) interaction.user.displayAvatarURL({ dynamic: true })

View file

@ -1,9 +1,9 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
module.exports = { module.exports = {
name: "suggest", name: "suggest",
description: "Make a suggestion of the bot", description: "Make a suggestion of the bot",
category: "Utilities", category: "Utilities",
type: "CHAT_INPUT",
run: async (client, interaction, args) => { run: async (client, interaction, args) => {
const questions = [ const questions = [
"Describe the suggestion", "Describe the suggestion",
@ -15,13 +15,16 @@ module.exports = {
interaction.followUp("Check your dm."); interaction.followUp("Check your dm.");
const appStart = await interaction.user.send({ const appStart = await interaction.user.send({
embeds: [ embeds: [
new MessageEmbed() new EmbedBuilder()
.setAuthor( .setAuthor(
interaction.user.username, interaction.user.username,
interaction.user.displayAvatarURL() interaction.user.displayAvatarURL()
) )
.setDescription(questions[collectCounter++]) .setDescription(questions[collectCounter++])
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp(), .setTimestamp(),
], ],
}); });
@ -31,32 +34,32 @@ module.exports = {
if (collectCounter < questions.length) { if (collectCounter < questions.length) {
channel.send({ channel.send({
embeds: [ embeds: [
new MessageEmbed() new EmbedBuilder()
.setAuthor( .setAuthor(
interaction.user.username, interaction.user.username,
interaction.user.displayAvatarURL() interaction.user.displayAvatarURL()
) )
.setDescription(questions[collectCounter++]) .setDescription(questions[collectCounter++])
.setFooter( .setFooter({
`Made by ${client.author}`, text: `Made by ${client.author}`,
client.user.displayAvatarURL() iconURL: client.user.displayAvatarURL(),
) })
.setTimestamp(), .setTimestamp(),
], ],
}); });
} else { } else {
channel.send({ channel.send({
embeds: [ embeds: [
new MessageEmbed() new EmbedBuilder()
.setTitle("SUCCESS!") .setTitle("SUCCESS!")
.setDescription( .setDescription(
"You have sent a suggestion.\nPlease wait for us to review it" "You have sent a suggestion.\nPlease wait for us to review it"
) )
.setColor("GREEN") .setColor("GREEN")
.setFooter( .setFooter({
`Made by ${client.author}`, text: `Made by ${client.author}`,
client.user.displayAvatarURL() iconURL: client.user.displayAvatarURL(),
) })
.setTimestamp(), .setTimestamp(),
], ],
}); });
@ -74,7 +77,7 @@ module.exports = {
appsChannel.send({ appsChannel.send({
embeds: [ embeds: [
new MessageEmbed() new EmbedBuilder()
.setAuthor( .setAuthor(
interaction.user.tag, interaction.user.tag,
interaction.user.displayAvatarURL({ dynamic: true }) interaction.user.displayAvatarURL({ dynamic: true })

View file

@ -1,12 +1,12 @@
const client = require("../"); const client = require("../");
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
const { Welcome } = require("../config.js"); const { Welcome } = require("../config.js");
client.on("guildMemberAdd", async member => { client.on("guildMemberAdd", async member => {
const channel = member.guild.channels.cache.find( const channel = member.guild.channels.cache.find(
channel => channel.id === Welcome channel => channel.id === Welcome
); );
if (!channel) return; if (!channel) return;
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setTitle( .setTitle(
`<:join:897246825122254848> Hello ${member}, Welcome to NYX's Support Server!` `<:join:897246825122254848> Hello ${member}, Welcome to NYX's Support Server!`
) )
@ -38,10 +38,10 @@ client.on("guildMemberAdd", async member => {
inline: true, inline: true,
} }
) )
.setFooter( .setFooter({
`${member.user.tag} joined the server!`, text: `${member.user.tag} joined the server!`,
member.user.displayAvatarURL({ dynamic: true }) iconURL: member.user.displayAvatarURL({ dynamic: true }),
) })
.setColor(client.color) .setColor(client.color)
.setTimestamp(); .setTimestamp();
@ -52,16 +52,16 @@ client.on("guildMemberRemove", async member => {
channel => channel.id === Welcome channel => channel.id === Welcome
); );
if (!channel) return; if (!channel) return;
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setTitle( .setTitle(
`<:leave:897246828045680640> ${member.user.username} can't handle being cool! ` `<:leave:897246828045680640> ${member.user.username} can't handle being cool! `
) )
.setThumbnail(member.guild.iconURL({ dynamic: true })) .setThumbnail(member.guild.iconURL({ dynamic: true }))
.setDescription(`We now only have ${member.guild.memberCount} members`) .setDescription(`We now only have ${member.guild.memberCount} members`)
.setFooter( .setFooter({
`${member.user.tag} left the server!`, text: `${member.user.tag} left the server!`,
member.user.displayAvatarURL({ dynamic: true }) iconURL: member.user.displayAvatarURL({ dynamic: true }),
) })
.setColor(client.color) .setColor(client.color)
.setTimestamp(); .setTimestamp();

View file

@ -1,10 +1,10 @@
const client = require("../"); const client = require("../");
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
const db = require("../models/guilds"); const db = require("../models/guilds");
client.on("guildCreate", guild => { client.on("guildCreate", guild => {
client.channels.cache.get(client.config.ServerLog).send({ client.channels.cache.get(client.config.ServerLog).send({
embeds: [ embeds: [
new MessageEmbed() new EmbedBuilder()
.setTitle("New Server") .setTitle("New Server")
.addField( .addField(
"Server Info", "Server Info",
@ -12,10 +12,10 @@ client.on("guildCreate", guild => {
**>Server ID**: \n${guild.id} **>Server ID**: \n${guild.id}
**>Server Member Count**: \n${guild.memberCount}` **>Server Member Count**: \n${guild.memberCount}`
) )
.setFooter( .setFooter({
`${client.user.username} Currently in ${client.guilds.cache.size} servers`, text: `${client.user.username} Currently in ${client.guilds.cache.size} servers`,
client.user.displayAvatarURL() iconURL: client.user.displayAvatarURL(),
) })
.setTimestamp() .setTimestamp()
.setThumbnail(guild.iconURL({ dynamic: true })) .setThumbnail(guild.iconURL({ dynamic: true }))
.setColor("GREEN"), .setColor("GREEN"),
@ -32,7 +32,7 @@ client.on("guildDelete", async guild => {
client.data.DelGuild(guild.id); client.data.DelGuild(guild.id);
client.channels.cache.get(client.config.ServerLog).send({ client.channels.cache.get(client.config.ServerLog).send({
embeds: [ embeds: [
new MessageEmbed() new EmbedBuilder()
.setTitle("Deleted Server") .setTitle("Deleted Server")
.addField( .addField(
"Server Info", "Server Info",
@ -40,10 +40,10 @@ client.on("guildDelete", async guild => {
**>Server ID**: \n${guild.id} **>Server ID**: \n${guild.id}
**>Server Member Count**: \n${guild.memberCount}` **>Server Member Count**: \n${guild.memberCount}`
) )
.setFooter( .setFooter({
`${client.user.username} Currently in ${client.guilds.cache.size} servers`, text: `${client.user.username} Currently in ${client.guilds.cache.size} servers`,
client.user.displayAvatarURL() iconURL: client.user.displayAvatarURL(),
) })
.setTimestamp() .setTimestamp()
.setThumbnail(guild.iconURL({ dynamic: true })) .setThumbnail(guild.iconURL({ dynamic: true }))
.setColor("RED"), .setColor("RED"),

View file

@ -1,7 +1,7 @@
const client = require("../"); const client = require("../");
const cooldown = require("../models/cooldown"); const cooldown = require("../models/cooldown");
const utils = require("../util/functions/function"); const utils = require("../util/functions/function");
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
client.on("interactionCreate", async interaction => { client.on("interactionCreate", async interaction => {
if (interaction.isCommand()) { if (interaction.isCommand()) {
await interaction.deferReply({ ephemeral: false }).catch(() => {}); await interaction.deferReply({ ephemeral: false }).catch(() => {});
@ -61,7 +61,7 @@ client.on("interactionCreate", async interaction => {
if (!data.User.Premium) { if (!data.User.Premium) {
return interaction.followUp({ return interaction.followUp({
embeds: [ embeds: [
new MessageEmbed() new EmbedBuilder()
.setURL(client.web) .setURL(client.web)
.setAuthor({ .setAuthor({
name: interaction.user.tag, name: interaction.user.tag,
@ -84,16 +84,16 @@ client.on("interactionCreate", async interaction => {
if (!data.Guild.Level) return; if (!data.Guild.Level) return;
} }
if (!interaction.guild.me.permissions.has(cmd.BotPerms || [])) { // if (!interaction.guild.me.permissions.has(cmd.BotPerms || [])) {
return interaction.followUp({ // return interaction.followUp({
content: `You can't use this command. I need to have ${cmd.BotPerms} permission to use this command.`, // 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 || [])) { // if (!interaction.member.permissions.has(cmd.UserPerms || [])) {
return interaction.followUp({ // return interaction.followUp({
content: `You can't use this command. I need to have ${cmd.UserPerms} permission to use this command.`, // content: `You can't use this command. I need to have ${cmd.UserPerms} permission to use this command.`,
}); // });
} // }
if (data.Guild) { if (data.Guild) {
if (data.Guild.Category) { if (data.Guild.Category) {
if (data.Guild.Category.includes(cmd.directory)) { if (data.Guild.Category.includes(cmd.directory)) {
@ -136,8 +136,8 @@ client.on("interactionCreate", async interaction => {
); );
cmd cmd
.run(client, interaction, args, utils, data) .run(client, interaction, args, utils, data)
.catch(e => sendE(e)); .catch(e => sendE(e, interaction));
client.addcmdsused(interaction.user.id); // client.addcmdsused(interaction.user.id);
client.channels.cache.get(client.config.CMDLog).send({ client.channels.cache.get(client.config.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})\``, content: `\`${interaction.user.tag}(${interaction.user.id})\`\n has used \n**${cmd.name}**\n command in \n\`${interaction.guild.name}(${interaction.guild.id})\``,
}); });
@ -147,11 +147,11 @@ client.on("interactionCreate", async interaction => {
if (data.Guild.Tips) utils.tips(interaction, client); if (data.Guild.Tips) utils.tips(interaction, client);
cmd cmd
.run(client, interaction, args, utils, data) .run(client, interaction, args, utils, data)
.catch(e => sendE(e)); .catch(e => sendE(e, interaction));
client.channels.cache.get(client.config.CMDLog).send({ client.channels.cache.get(client.config.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})\``, content: `\`${interaction.user.tag}(${interaction.user.id})\`\n has used \n**${cmd.name}**\n command in \n\`${interaction.guild.name}(${interaction.guild.id})\``,
}); });
client.addcmdsused(interaction.user.id); // client.addcmdsused(interaction.user.id);
// await client.addXP(interaction.user.id, random, interaction); // await client.addXP(interaction.user.id, random, interaction);
new cooldown({ new cooldown({
User: interaction.user.id, User: interaction.user.id,
@ -164,15 +164,17 @@ client.on("interactionCreate", async interaction => {
); );
} else { } else {
if (data.Guild.Tips) utils.tips(interaction, client); if (data.Guild.Tips) utils.tips(interaction, client);
cmd.run(client, interaction, args, utils, data).catch(e => sendE(e)); cmd
.run(client, interaction, args, utils, data)
.catch(e => sendE(e, interaction));
client.channels.cache.get(client.config.CMDLog).send({ client.channels.cache.get(client.config.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})\``, content: `\`${interaction.user.tag}(${interaction.user.id})\`\n has used \n**${cmd.name}**\n command in \n\`${interaction.guild.name}(${interaction.guild.id})\``,
}); });
client.addcmdsused(interaction.user.id); // client.addcmdsused(interaction.user.id);
// await client.addXP(interaction.user.id, random, interaction); // await client.addXP(interaction.user.id, random, interaction);
} }
} }
if (interaction.isContextMenu()) { if (interaction.isContextMenuCommand()) {
await interaction.deferReply({ ephemeral: false }); await interaction.deferReply({ ephemeral: false });
const command = client.slashCommands.get(interaction.commandName); const command = client.slashCommands.get(interaction.commandName);
if (command) command.run(client, interaction); if (command) command.run(client, interaction);
@ -197,20 +199,22 @@ client.on("interactionCreate", async interaction => {
interaction.member = interaction.guild.members.cache.get( interaction.member = interaction.guild.members.cache.get(
interaction.user.id interaction.user.id
); );
ownercmd.run(client, interaction, args, utils).catch(e => sendE(e)); ownercmd
.run(client, interaction, args, utils)
.catch(e => sendE(e, interaction));
client.channels.cache.get(client.config.CMDLog).send({ client.channels.cache.get(client.config.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})\``, content: `\`${interaction.user.tag}(${interaction.user.id})\`\n has used \n**${ownercmd.name}**\n command in \n\`${interaction.guild.name}(${interaction.guild.id})\``,
}); });
client.addcmdsused(interaction.user.id); //client.addcmdsused(interaction.user.id);
} }
}); });
function sendE(e) { function sendE(e, i) {
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setTitle("Command Error") .setTitle("Command Error")
.setDescription(`\`\`\`yaml\n${e.stack}\`\`\``) .setDescription(`\`\`\`yaml\n${e.stack}\`\`\``)
.setTimestamp() .setTimestamp()
.setColor(client.color) .setColor(client.color)
.setFooter({ text: client.user.username }); .setFooter({ text: client.user.username });
interaction.channel.send({ embeds: [embed] }); i.channel.send({ embeds: [embed] });
client.channels.cache.get(client.config.ErrorLog).send({ embeds: [embed] }); client.channels.cache.get(client.config.ErrorLog).send({ embeds: [embed] });
} }

View file

@ -1,5 +1,5 @@
const client = require(".."); const client = require("..");
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
const utils = require("../util/functions/function"); const utils = require("../util/functions/function");
const domains = require("../util/Data/domains.json"); const domains = require("../util/Data/domains.json");
client.on("messageCreate", async message => { client.on("messageCreate", async message => {
@ -13,7 +13,7 @@ client.on("messageCreate", async message => {
data.User = userDB; data.User = userDB;
if (!guildDB) await client.data.CreateGuild(message.guild.id); if (!guildDB) await client.data.CreateGuild(message.guild.id);
if (message.content.match(new RegExp(`^<@!?${client.user.id}>( |)$`))) { if (message.content.match(new RegExp(`^<@!?${client.user.id}>( |)$`))) {
const _ = new MessageEmbed() const _ = new EmbedBuilder()
.addFields( .addFields(
{ {
name: "Prefix/Usage", name: "Prefix/Usage",
@ -55,7 +55,10 @@ client.on("messageCreate", async message => {
.setThumbnail(client.user.displayAvatarURL()) .setThumbnail(client.user.displayAvatarURL())
.setURL(client.web) .setURL(client.web)
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp() .setTimestamp()
.setColor(client.color); .setColor(client.color);
const m = await message.reply({ const m = await message.reply({
@ -97,7 +100,7 @@ client.on("messageCreate", async message => {
.slice(0, -1) .slice(0, -1)
) )
) { ) {
const _ = new MessageEmbed() const _ = new EmbedBuilder()
.setTitle(`Scam/IP Grabber detected`) .setTitle(`Scam/IP Grabber detected`)
.setTimestamp() .setTimestamp()
.setColor(client.color) .setColor(client.color)
@ -151,7 +154,7 @@ client.on("messageCreate", async message => {
message?.content.startsWith("C.") || message?.content.startsWith("C.") ||
message?.content.startsWith("c.") message?.content.startsWith("c.")
) { ) {
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setTitle(`Message commands are now disabled`) .setTitle(`Message commands are now disabled`)
.setDescription( .setDescription(
`Please enable **Use Application Commands** in the channel settings to get access to slash commands, we have discontinued message commands\n\nUse \`/help\` to see more info` `Please enable **Use Application Commands** in the channel settings to get access to slash commands, we have discontinued message commands\n\nUse \`/help\` to see more info`
@ -191,10 +194,10 @@ client.on("messageCreate", async message => {
} }
) )
.setURL(client.web) .setURL(client.web)
.setFooter( .setFooter({
`Requested by ${message.author.tag}`, text: `Requested by ${message.author.tag}`,
message.author.displayAvatarURL({ dynamic: true }) iconURL: message.author.displayAvatarURL({ dynamic: true }),
) })
// .setThumbnail("../../util/assets/images/nyx_logo_transparent.webp") // .setThumbnail("../../util/assets/images/nyx_logo_transparent.webp")
.setTimestamp(); .setTimestamp();
message.reply({ message.reply({
@ -223,7 +226,7 @@ client.on("messageCreate", async message => {
if (message.content) { if (message.content) {
client.channels.cache.get(client.config.DMLog).send({ client.channels.cache.get(client.config.DMLog).send({
embeds: [ embeds: [
new MessageEmbed() new EmbedBuilder()
.setDescription(message.content) .setDescription(message.content)
.setColor(client.color) .setColor(client.color)
.setAuthor({ .setAuthor({

View file

@ -1,17 +1,4 @@
const client = require(".."); const client = require("..");
const version = require("../package.json").version;
const starboardClient = require("../client/StarboardClient");
const g = require("../models/guilds");
client.on("ready", async () => { 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}`); console.log(`${client.user.username}`);
}); });

View file

@ -1,5 +1,5 @@
const NYX = require("./client/NYX"); const NYX = require("./client/NYX");
const client = new NYX(); const client = new NYX();
module.exports = client; module.exports = client;
process.on("unhandledRejection", () => {}); // add // when need to debug //process.on("unhandledRejection", () => {}); // add // when need to debug
client.start(); client.start();

View file

@ -42,10 +42,8 @@
"dependencies": { "dependencies": {
"axios": "^0.27.2", "axios": "^0.27.2",
"cath": "^1.4.7", "cath": "^1.4.7",
"discord.js": "^13.6.0", "discord.js": "^14.6.0",
"dotenv": "^16.0.0", "dotenv": "^16.0.0",
"erela.js": "^2.3.3",
"erela.js-spotify": "^1.2.0",
"goosecache": "^9.0.14", "goosecache": "^9.0.14",
"moment": "^2.29.1", "moment": "^2.29.1",
"mongoose": "^5.13.14", "mongoose": "^5.13.14",

View file

@ -1,5 +1,5 @@
const schema = require("../../models/custom-commands"); const schema = require("../../models/custom-commands");
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
module.exports = { module.exports = {
name: "cc-list", name: "cc-list",
@ -10,11 +10,11 @@ module.exports = {
const data = await schema.find({ Guild: message.guild.id }); const data = await schema.find({ Guild: message.guild.id });
if (!!data === false) return client.err(messgae, "Config", "cmd-list", 10); if (!!data === false) return client.err(messgae, "Config", "cmd-list", 10);
message.channel.send( message.channel.send(
new MessageEmbed() new EmbedBuilder()
.setColor(client.color) .setColor(client.color)
.setDescription( .setDescription(
data.map((cmd, i) => `${i + 1}: ${cmd.Command}`).join("\n"), data.map((cmd, i) => `${i + 1}: ${cmd.Command}`).join("\n")
), )
); );
}, },
}; };

View file

@ -9,12 +9,12 @@ module.exports = {
run: async (client, message, args) => { run: async (client, message, args) => {
message.delete(); message.delete();
message.channel.send( message.channel.send(
new Discord.MessageEmbed() new Discord.EmbedBuilder()
.setTitle(`Setup | 1/3`) .setTitle(`Setup | 1/3`)
.setDescription( .setDescription(
"What is the name of the command?\nYou can cancel the setup at any time by sending `cancel`.", "What is the name of the command?\nYou can cancel the setup at any time by sending `cancel`."
) )
.setColor(client.color), .setColor(client.color)
); );
await startMessageCollectors(client, message, args); await startMessageCollectors(client, message, args);
function startMessageCollectors(client, message, args) { function startMessageCollectors(client, message, args) {
@ -22,7 +22,7 @@ module.exports = {
const nameCollector = new Discord.MessageCollector( const nameCollector = new Discord.MessageCollector(
message.channel, message.channel,
nameFilter, nameFilter,
{ max: 999 }, { max: 999 }
); );
nameCollector.on("collect", async msg => { nameCollector.on("collect", async msg => {
const name = msg.content.toLowerCase(); const name = msg.content.toLowerCase();
@ -44,8 +44,7 @@ module.exports = {
await msg.channel.send("You don't specify a name. Cancelled setup."); await msg.channel.send("You don't specify a name. Cancelled setup.");
nameCollector.stop(); nameCollector.stop();
return; return;
} } else {
else {
const newDB = new db({ const newDB = new db({
Guild: message.guild.id, Guild: message.guild.id,
Command: name, Command: name,
@ -53,12 +52,12 @@ module.exports = {
await newDB.save(); await newDB.save();
console.log(newDB); console.log(newDB);
msg.channel.send( msg.channel.send(
new Discord.MessageEmbed() new Discord.EmbedBuilder()
.setTitle(`Setup | 2/3`) .setTitle(`Setup | 2/3`)
.setDescription( .setDescription(
`The command name will be **${name}**.\nWhat is the response for the command? You can have mutliple response by joning them with differnt lines.`, `The command name will be **${name}**.\nWhat is the response for the command? You can have mutliple response by joning them with differnt lines.`
) )
.setColor(client.color), .setColor(client.color)
); );
nameCollector.stop(); nameCollector.stop();
} }
@ -66,7 +65,7 @@ module.exports = {
const responseCollector = new Discord.MessageCollector( const responseCollector = new Discord.MessageCollector(
message.channel, message.channel,
responseFilter, responseFilter,
{ max: 999 }, { max: 999 }
); );
responseCollector.on("collect", async msg => { responseCollector.on("collect", async msg => {
const response = msg.content.split("\n"); const response = msg.content.split("\n");
@ -90,36 +89,36 @@ module.exports = {
data.Response = response; data.Response = response;
await db.findOneAndUpdate( await db.findOneAndUpdate(
{ Guild: message.guild.id, Command: name }, { Guild: message.guild.id, Command: name },
data, data
); );
console.log(data); console.log(data);
} }
}, }
); );
msg.channel.send( msg.channel.send(
new Discord.MessageEmbed() new Discord.EmbedBuilder()
.setTitle(`Setup | 3/4`) .setTitle(`Setup | 3/4`)
.setColor(client.color) .setColor(client.color)
.setDescription( .setDescription(
`Ok so there will be ${response.length} responses. Do you want the response be randomized?\n\`Type yes or no\` \nIf you choose no, accumlative responses may let the command can\'t be sent out.`, `Ok so there will be ${response.length} responses. Do you want the response be randomized?\n\`Type yes or no\` \nIf you choose no, accumlative responses may let the command can\'t be sent out.`
), )
); );
const randomFilter = m => m.author.id === message.author.id; const randomFilter = m => m.author.id === message.author.id;
const randomCollector = new Discord.MessageCollector( const randomCollector = new Discord.MessageCollector(
message.channel, message.channel,
randomFilter, randomFilter,
{ max: 999 }, { max: 999 }
); );
randomCollector.on("collect", async msg => { randomCollector.on("collect", async msg => {
let maybe; let maybe;
if (msg.content.toLowerCase() === "yes") { if (msg.content.toLowerCase() === "yes") {
msg.channel.send( msg.channel.send(
new Discord.MessageEmbed() new Discord.EmbedBuilder()
.setColor(client.color) .setColor(client.color)
.setTitle(`Setup | 4/4`) .setTitle(`Setup | 4/4`)
.setDescription( .setDescription(
`The responses will be randomized. Do you want to have delete command usage? \`Type yes or no\``, `The responses will be randomized. Do you want to have delete command usage? \`Type yes or no\``
), )
); );
randomCollector.stop(); randomCollector.stop();
maybe = true; maybe = true;
@ -138,18 +137,18 @@ module.exports = {
Command: name, Command: name,
Response: response, Response: response,
}, },
data, data
); );
console.log(data); console.log(data);
} }
}, }
); );
console.log(`Random: ${maybe}`); console.log(`Random: ${maybe}`);
const deleteeeFilter = m => m.author.id === message.author.id; const deleteeeFilter = m => m.author.id === message.author.id;
const deleteeeCollector = new Discord.MessageCollector( const deleteeeCollector = new Discord.MessageCollector(
message.channel, message.channel,
deleteeeFilter, deleteeeFilter,
{ max: 999 }, { max: 999 }
); );
deleteeeCollector.on("collect", async msg => { deleteeeCollector.on("collect", async msg => {
let idkwor; let idkwor;
@ -173,14 +172,14 @@ module.exports = {
Response: response, Response: response,
Random: maybe, Random: maybe,
}, },
data, data
); );
console.log(data); console.log(data);
msg.reply( msg.reply(
`Saved **${data.Command}** as a custom command`, `Saved **${data.Command}** as a custom command`
); );
} }
}, }
); );
console.log(`Usage Delete: ${idkwor}`); console.log(`Usage Delete: ${idkwor}`);
} }
@ -204,14 +203,14 @@ module.exports = {
Response: response, Response: response,
Random: maybe, Random: maybe,
}, },
data, data
); );
console.log(data); console.log(data);
msg.reply( msg.reply(
`Saved **${data.Command}** as a custom command`, `Saved **${data.Command}** as a custom command`
); );
} }
}, }
); );
} }
if (msg.content.toLowerCase() === "cancel") { if (msg.content.toLowerCase() === "cancel") {
@ -223,12 +222,12 @@ module.exports = {
} }
if (msg.content.toLowerCase() === "no") { if (msg.content.toLowerCase() === "no") {
msg.channel.send( msg.channel.send(
new Discord.MessageEmbed() new Discord.EmbedBuilder()
.setColor(client.color) .setColor(client.color)
.setTitle(`Setup | 4/4`) .setTitle(`Setup | 4/4`)
.setDescription( .setDescription(
`The responses won't be randomized. Do you want to have delete command usage? \`Type yes or no\``, `The responses won't be randomized. Do you want to have delete command usage? \`Type yes or no\``
), )
); );
randomCollector.stop(); randomCollector.stop();
maybe = false; maybe = false;
@ -247,17 +246,17 @@ module.exports = {
Command: name, Command: name,
Response: response, Response: response,
}, },
data, data
); );
console.log(data); console.log(data);
} }
}, }
); );
const deleteeFilter = m => m.author.id === message.author.id; const deleteeFilter = m => m.author.id === message.author.id;
const deleteeCollector = new Discord.MessageCollector( const deleteeCollector = new Discord.MessageCollector(
message.channel, message.channel,
deleteeFilter, deleteeFilter,
{ max: 999 }, { max: 999 }
); );
deleteeCollector.on("collect", async msg => { deleteeCollector.on("collect", async msg => {
let idkwor; let idkwor;
@ -280,13 +279,13 @@ module.exports = {
Response: response, Response: response,
Random: maybe, Random: maybe,
}, },
data, data
); );
msg.reply( msg.reply(
`Saved **${data.Command}** as a custom command`, `Saved **${data.Command}** as a custom command`
); );
} }
}, }
); );
console.log(`Usage Delete: ${idkwor}`); console.log(`Usage Delete: ${idkwor}`);
} }
@ -309,13 +308,13 @@ module.exports = {
Command: name, Command: name,
Response: response, Response: response,
}, },
data, data
); );
msg.reply( msg.reply(
`Saved **${data.Command}** as a custom command`, `Saved **${data.Command}** as a custom command`
); );
} }
}, }
); );
} }
if (msg.content.toLowerCase() === "cancel") { if (msg.content.toLowerCase() === "cancel") {
@ -331,8 +330,7 @@ module.exports = {
return; return;
} }
}); });
} } else {
else {
await db.findOne( await db.findOne(
{ Guild: message.guild.id, Command: name }, { Guild: message.guild.id, Command: name },
async (err, data) => { async (err, data) => {
@ -340,26 +338,26 @@ module.exports = {
data.Response = response; data.Response = response;
await db.findOneAndUpdate( await db.findOneAndUpdate(
{ Guild: message.guild.id, Command: name }, { Guild: message.guild.id, Command: name },
data, data
); );
console.log(data); console.log(data);
} }
}, }
); );
msg.channel.send( msg.channel.send(
new Discord.MessageEmbed() new Discord.EmbedBuilder()
.setTitle(`Setup | 3/3`) .setTitle(`Setup | 3/3`)
.setColor(client.color) .setColor(client.color)
.setDescription( .setDescription(
`The response is \n**${response}**\nDo you to want have delete command usage?`, `The response is \n**${response}**\nDo you to want have delete command usage?`
), )
); );
responseCollector.stop(); responseCollector.stop();
const deleteFilter = m => m.author.id === message.author.id; const deleteFilter = m => m.author.id === message.author.id;
const deleteCollector = new Discord.MessageCollector( const deleteCollector = new Discord.MessageCollector(
message.channel, message.channel,
deleteFilter, deleteFilter,
{ max: 999 }, { max: 999 }
); );
deleteCollector.on("collect", async msg => { deleteCollector.on("collect", async msg => {
let idkwor; let idkwor;
@ -381,13 +379,13 @@ module.exports = {
Command: name, Command: name,
Response: response, Response: response,
}, },
data, data
); );
msg.reply( msg.reply(
`Saved **${data.Command}** as a custom command`, `Saved **${data.Command}** as a custom command`
); );
} }
}, }
); );
} }
if (msg.content.toLowerCase() === "no") { if (msg.content.toLowerCase() === "no") {
@ -408,13 +406,13 @@ module.exports = {
Command: name, Command: name,
Response: response, Response: response,
}, },
data, data
); );
msg.reply( msg.reply(
`Saved **${data.Command}** as a custom command`, `Saved **${data.Command}** as a custom command`
); );
} }
}, }
); );
} }
if (msg.content.toLowerCase() === "cancel") { if (msg.content.toLowerCase() === "cancel") {

View file

@ -1,4 +1,4 @@
const { Client, Message, MessageEmbed } = require("discord.js"); const { Client, Message, EmbedBuilder } = require("discord.js");
module.exports = { module.exports = {
name: "migrate", name: "migrate",
usage: "(Server ID)", usage: "(Server ID)",
@ -14,8 +14,7 @@ module.exports = {
await message.guild.emojis.create(e.url, e.name); await message.guild.emojis.create(e.url, e.name);
}); });
return message.channel.send(`Created Emotes.`); return message.channel.send(`Created Emotes.`);
} } catch (e) {
catch (e) {
console.log(e); console.log(e);
} }
}, },

View file

@ -1,5 +1,5 @@
const schema = require("../../models/modmail"); const schema = require("../../models/modmail");
const { Client, Message, MessageEmbed } = require("discord.js"); const { Client, Message, EmbedBuilder } = require("discord.js");
module.exports = { module.exports = {
name: "modmail-category", name: "modmail-category",
@ -8,17 +8,18 @@ module.exports = {
usage: "(Category ID)", usage: "(Category ID)",
category: "Config", category: "Config",
run: async (client, message, args) => { run: async (client, message, args) => {
if (!args.length) {return client.err(message, "Config", "modmail-category", 0);} if (!args.length) {
return client.err(message, "Config", "modmail-category", 0);
}
const category = message.guild.channels.cache.find( const category = message.guild.channels.cache.find(
ch => (ch.type = "GUILD_CATEGORY" && ch.id == args[0]), ch => (ch.type = "GUILD_CATEGORY" && ch.id == args[0])
); );
if (!category) return client.err(message, "Config", "modmail-category", 1); if (!category) return client.err(message, "Config", "modmail-category", 1);
schema.findOne({ Guild: message.guild.id }, async (err, data) => { schema.findOne({ Guild: message.guild.id }, async (err, data) => {
if (data) { if (data) {
data.Category = category.id; data.Category = category.id;
await schema.findOneAndUpdate({ Guild: message.guild.id }, data); await schema.findOneAndUpdate({ Guild: message.guild.id }, data);
} } else {
else {
new schema({ new schema({
Guild: message.guild.id, Guild: message.guild.id,
Category: category.id, Category: category.id,

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
module.exports = { module.exports = {
name: "balance", name: "balance",
description: "Show an user's balance", description: "Show an user's balance",
@ -12,18 +12,21 @@ module.exports = {
required: false, required: false,
}, },
], ],
type: "CHAT_INPUT",
run: async (client, interaction, args) => { run: async (client, interaction, args) => {
const user = const user =
interaction.guild.members.cache.get(args[0]) || interaction.member; interaction.guild.members.cache.get(args[0]) || interaction.member;
const bal = await client.bal(user.id); const bal = await client.bal(user.id);
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setTitle(`${user.displayName}'s Balance`) .setTitle(`${user.displayName}'s Balance`)
.setDescription(`**${bal}** ${client.currency}`) .setDescription(`**${bal}** ${client.currency}`)
.setColor(client.color) .setColor(client.color)
.setURL(client.web) .setURL(client.web)
.setTimestamp() .setTimestamp()
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()); .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
});
interaction.followUp({ embeds: [embed] }); interaction.followUp({ embeds: [embed] });
}, },
}; };

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
const { bool } = require("cath"); const { bool } = require("cath");
module.exports = { module.exports = {
name: "bet", name: "bet",
@ -29,10 +29,13 @@ module.exports = {
const multi = (await client.multi(interaction)) / 10 + 1; const multi = (await client.multi(interaction)) / 10 + 1;
await client.add(interaction.user.id, winamt, interaction); await client.add(interaction.user.id, winamt, interaction);
await client.ADDBWin(interaction.user.id); await client.ADDBWin(interaction.user.id);
const abc = new MessageEmbed() const abc = new EmbedBuilder()
.setColor("GREEN") .setColor("GREEN")
.setTimestamp() .setTimestamp()
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTitle(`${interaction.user.username} wins a gamble game`) .setTitle(`${interaction.user.username} wins a gamble game`)
.addFields( .addFields(
{ {
@ -56,10 +59,13 @@ module.exports = {
interaction.followUp({ embeds: [abc] }); interaction.followUp({ embeds: [abc] });
} else { } else {
await client.rmv(interaction.user.id, amt); await client.rmv(interaction.user.id, amt);
const cba = new MessageEmbed() const cba = new EmbedBuilder()
.setColor("RED") .setColor("RED")
.setTimestamp() .setTimestamp()
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTitle(`${interaction.user.username} loses a gamble game`) .setTitle(`${interaction.user.username} loses a gamble game`)
.addFields( .addFields(
{ {

View file

@ -144,10 +144,13 @@ module.exports = {
dealerMsg += " > " + dealer.score.toString(); dealerMsg += " > " + dealer.score.toString();
} }
const gambleEmbed = new Discord.MessageEmbed() const gambleEmbed = new Discord.EmbedBuilder()
.setColor(cl || client.color) .setColor(cl || client.color)
.setTimestamp() .setTimestamp()
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTitle(interaction.user.username + `'s Blackjack game`) .setTitle(interaction.user.username + `'s Blackjack game`)
.addField("You", cardsMsg, true) .addField("You", cardsMsg, true)
.addField("NYX", dealerMsg, true) .addField("NYX", dealerMsg, true)

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
const inventory = require("../../models/econ"); const inventory = require("../../models/econ");
const items = require("../../util/Data/item.json"); const items = require("../../util/Data/item.json");
module.exports = { module.exports = {
@ -75,7 +75,7 @@ module.exports = {
}); });
interaction.followUp({ interaction.followUp({
embeds: [ embeds: [
new MessageEmbed() new EmbedBuilder()
.setTimestamp() .setTimestamp()
.setDescription( .setDescription(
`**${ `**${
@ -90,10 +90,10 @@ module.exports = {
interaction.user.tag, interaction.user.tag,
interaction.user.displayAvatarURL({ dynamic: true }) interaction.user.displayAvatarURL({ dynamic: true })
) )
.setFooter( .setFooter({
`Made by ${client.author}`, text: `Made by ${client.author}`,
client.user.displayAvatarURL() iconURL: client.user.displayAvatarURL(),
), }),
], ],
}); });
await client.rmv(interaction.user.id, itemPrice * num); await client.rmv(interaction.user.id, itemPrice * num);

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
module.exports = { module.exports = {
name: "daily", name: "daily",
description: "Earns daily money", description: "Earns daily money",
@ -10,20 +10,23 @@ module.exports = {
if (user) { if (user) {
if (user.Premium == true) { if (user.Premium == true) {
money = 20000; money = 20000;
const pre_embed = new MessageEmbed() const pre_embed = new EmbedBuilder()
.setTitle(`${user.username}'s profile`) .setTitle(`${user.username}'s profile`)
.setDescription( .setDescription(
`Here is your daily **${money}** ${client.currency}\nYou can use this again in 24hrs` `Here is your daily **${money}** ${client.currency}\nYou can use this again in 24hrs`
) )
.setURL(client.web) .setURL(client.web)
.setColor(client.color) .setColor(client.color)
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp(); .setTimestamp();
await client.add(interaction.user.id, money, interaction); await client.add(interaction.user.id, money, interaction);
return interaction.followUp({ embeds: [pre_embed] }); return interaction.followUp({ embeds: [pre_embed] });
} else { } else {
money = 10000; money = 10000;
const norm_embed = new MessageEmbed() const norm_embed = new EmbedBuilder()
.setAuthor( .setAuthor(
interaction.user.tag, interaction.user.tag,
interaction.user.displayAvatarURL({ dyanmic: true }) interaction.user.displayAvatarURL({ dyanmic: true })
@ -33,7 +36,10 @@ module.exports = {
) )
.setURL(client.web) .setURL(client.web)
.setColor(client.color) .setColor(client.color)
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp(); .setTimestamp();
await client.add(interaction.user.id, money, interaction); await client.add(interaction.user.id, money, interaction);
return interaction.followUp({ embeds: [norm_embed] }); return interaction.followUp({ embeds: [norm_embed] });

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
const inventory = require("../../models/econ"); const inventory = require("../../models/econ");
const items = require("../../util/Data/item.json"); const items = require("../../util/Data/item.json");
module.exports = { module.exports = {
@ -72,7 +72,7 @@ module.exports = {
data.Inventory[dbName] -= number; data.Inventory[dbName] -= number;
interaction.followUp({ interaction.followUp({
embeds: [ embeds: [
new MessageEmbed() new EmbedBuilder()
.setColor(client.color) .setColor(client.color)
.setAuthor( .setAuthor(
interaction.user.tag, interaction.user.tag,

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
const e = require("../../models/econ"); const e = require("../../models/econ");
const list = require("../../util/Data/gun.json"); const list = require("../../util/Data/gun.json");
module.exports = { module.exports = {
@ -6,7 +6,7 @@ module.exports = {
description: "Configure Weapon Master System settings", description: "Configure Weapon Master System settings",
options: [ options: [
{ {
type: "SUB_COMMAND", type: 1,
name: "select", name: "select",
description: "Select the gun for the game", description: "Select the gun for the game",
options: [ options: [
@ -29,13 +29,13 @@ module.exports = {
], ],
}, },
{ {
type: "SUB_COMMAND", type: 1,
name: "list", name: "list",
description: "See the information for the guns", description: "See the information for the guns",
options: [], options: [],
}, },
{ {
type: "SUB_COMMAND", type: 1,
name: "info", name: "info",
description: "See the stats of your gun", description: "See the stats of your gun",
}, },
@ -45,9 +45,12 @@ module.exports = {
const lists = list.map(value => { const lists = list.map(value => {
return `**${value.emoji} ${value.name}**\n**Description**: ${value.description}`; return `**${value.emoji} ${value.name}**\n**Description**: ${value.description}`;
}); });
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setColor(client.color) .setColor(client.color)
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp() .setTimestamp()
.setDescription(lists.join("\n\n")); .setDescription(lists.join("\n\n"));
interaction.followUp({ embeds: [embed] }); interaction.followUp({ embeds: [embed] });
@ -101,14 +104,14 @@ module.exports = {
}); });
} else { } else {
const link = list.find(a => a.name === data.Gun.Name).link; const link = list.find(a => a.name === data.Gun.Name).link;
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setThumbnail(link) .setThumbnail(link)
.setTimestamp() .setTimestamp()
.setColor(client.color) .setColor(client.color)
.setFooter( .setFooter({
`Made by ${client.author}`, text: `Made by ${client.author}`,
client.user.displayAvatarURL() iconURL: client.user.displayAvatarURL(),
) })
.addField("Name", data.Gun.Name, true) .addField("Name", data.Gun.Name, true)
.addField("Rank", data.Gun.Rank, true) .addField("Rank", data.Gun.Rank, true)
.addField("XP", data.Gun.XP.toString(), true); .addField("XP", data.Gun.XP.toString(), true);

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
const inv = require("../../models/econ"); const inv = require("../../models/econ");
const { Pagination } = require("cath"); const { Pagination } = require("cath");
const items = require("../../util/Data/item.json"); const items = require("../../util/Data/item.json");
@ -45,12 +45,12 @@ module.exports = {
}); });
} }
const c = util.chunk(mappedData, 5).map(x => x.join("\n")); const c = util.chunk(mappedData, 5).map(x => x.join("\n"));
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setTimestamp() .setTimestamp()
.setTitle(`${user.displayName}'s inventory`) .setTitle(`${user.displayName}'s inventory`)
.setColor(client.color) .setColor(client.color)
.setDescription(c[0]) .setDescription(c[0])
.setFooter(`Page 1 of ${c.length}`); .setFooter({ text: `Page 1 of ${c.length}` });
try { try {
const msg = await interaction.followUp({ embeds: [embed] }); const msg = await interaction.followUp({ embeds: [embed] });
if (mappedData.length > 5) { if (mappedData.length > 5) {

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
module.exports = { module.exports = {
name: "multiplier", name: "multiplier",
@ -32,13 +32,16 @@ module.exports = {
i += "Channel Name includes NYX - 10%\n"; i += "Channel Name includes NYX - 10%\n";
e += 10; e += 10;
} }
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.addField(`**Total Multiplier: ${e}%** (Maximum: 50%)`, i) .addField(`**Total Multiplier: ${e}%** (Maximum: 50%)`, i)
.setColor(client.color) .setColor(client.color)
.setURL(client.web) .setURL(client.web)
.setTitle(`${user.displayName}'s Multiplier`) .setTitle(`${user.displayName}'s Multiplier`)
.setTimestamp() .setTimestamp()
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()); .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
});
interaction.followUp({ embeds: [embed] }); interaction.followUp({ embeds: [embed] });
}, },
}; };

View file

@ -1,9 +1,9 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
module.exports = { module.exports = {
name: "profile", name: "profile",
usage: "(User)", usage: "(User)",
description: "Check an user economy profile", description: "Check an user economy profile",
type: "CHAT_INPUT",
options: [ options: [
{ {
type: 6, type: 6,
@ -21,8 +21,11 @@ module.exports = {
const cmdused = await client.cmdsUSED(user.user.id); const cmdused = await client.cmdsUSED(user.user.id);
const bal = await client.bal(user.user.id); const bal = await client.bal(user.user.id);
const multi = await client.multi(interaction); const multi = await client.multi(interaction);
const game = new MessageEmbed() const game = new EmbedBuilder()
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setColor("7196ef") .setColor("7196ef")
.setTitle(`${user.displayName}'s profile`) .setTitle(`${user.displayName}'s profile`)
.setDescription(`Current Balance ${bal} ${client.currency}`) .setDescription(`Current Balance ${bal} ${client.currency}`)

View file

@ -1,4 +1,4 @@
const { Collection, MessageEmbed } = require("discord.js"); const { Collection, EmbedBuilder } = require("discord.js");
module.exports = { module.exports = {
name: "rich", name: "rich",
description: "Displaying top 10 richest users.", description: "Displaying top 10 richest users.",
@ -27,7 +27,7 @@ module.exports = {
const ata = collection.sort((a, b) => b.bal - a.bal).first(10); const ata = collection.sort((a, b) => b.bal - a.bal).first(10);
interaction.followUp({ interaction.followUp({
embeds: [ embeds: [
new MessageEmbed() new EmbedBuilder()
.setTitle(`Richest users in ${interaction.guild.name}`) .setTitle(`Richest users in ${interaction.guild.name}`)
.setDescription( .setDescription(
ata ata
@ -38,7 +38,10 @@ module.exports = {
}) })
.join("\n") .join("\n")
) )
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp() .setTimestamp()
.setColor(client.color), .setColor(client.color),
], ],

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
const { Pagination } = require("cath"); const { Pagination } = require("cath");
const items = require("../../util/Data/item.json"); const items = require("../../util/Data/item.json");
module.exports = { module.exports = {
@ -26,12 +26,12 @@ module.exports = {
)}**\n\`Type:\` **${value.type}**`; )}**\n\`Type:\` **${value.type}**`;
}); });
const c = util.chunk(list, 5).map(x => x.join("\n\n")); const c = util.chunk(list, 5).map(x => x.join("\n\n"));
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setTitle("**NYX Shop**") .setTitle("**NYX Shop**")
.setTimestamp() .setTimestamp()
.setDescription(c[0]) .setDescription(c[0])
.setColor(client.color) .setColor(client.color)
.setFooter(`Page 1 of ${c.length}`); .setFooter({ text: `Page 1 of ${c.length}` });
try { try {
const msg = await interaction.followUp({ embeds: [embed] }); const msg = await interaction.followUp({ embeds: [embed] });
if (list.length > 5) await util.pagination(msg, interaction.user, c); if (list.length > 5) await util.pagination(msg, interaction.user, c);
@ -50,7 +50,7 @@ module.exports = {
}); });
} else { } else {
const theitem = items.find(i => i.aliases.includes(itemToSearch)); const theitem = items.find(i => i.aliases.includes(itemToSearch));
const all = new MessageEmbed() const all = new EmbedBuilder()
.setTitle(`${theitem.emoji} ${theitem.name}`) .setTitle(`${theitem.emoji} ${theitem.name}`)
.setDescription( .setDescription(
` `

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
module.exports = { module.exports = {
name: "slots", name: "slots",
usage: "(Number)", usage: "(Number)",
@ -48,9 +48,12 @@ module.exports = {
const multi = (await client.multi(interaction)) / 10 + 1; const multi = (await client.multi(interaction)) / 10 + 1;
await client.add(interaction.user.id, winamt, interaction); await client.add(interaction.user.id, winamt, interaction);
await client.ADDSWin(interaction.user.id); await client.ADDSWin(interaction.user.id);
const won = new MessageEmbed() const won = new EmbedBuilder()
.setColor("GREEN") .setColor("GREEN")
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp() .setTimestamp()
.addField( .addField(
"|-----|-----|----|", "|-----|-----|----|",
@ -87,9 +90,12 @@ module.exports = {
interaction.followUp({ embeds: [won] }); interaction.followUp({ embeds: [won] });
} else { } else {
await client.rmv(interaction.user.id, amt); await client.rmv(interaction.user.id, amt);
const lost = new MessageEmbed() const lost = new EmbedBuilder()
.setColor("RED") .setColor("RED")
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp() .setTimestamp()
.addField( .addField(
"|-----|-----|----|", "|-----|-----|----|",

View file

@ -1,5 +1,5 @@
const db = require("../../models/econ"); const db = require("../../models/econ");
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
const { bool } = require("cath"); const { bool } = require("cath");
module.exports = { module.exports = {
name: "rob", name: "rob",
@ -40,11 +40,11 @@ module.exports = {
client.createProfile(tryrob.id); client.createProfile(tryrob.id);
interaction.followUp({ interaction.followUp({
embeds: [ embeds: [
new MessageEmbed() new EmbedBuilder()
.setFooter( .setFooter({
`Made by ${client.author}`, text: `Made by ${client.author}`,
client.user.displayAvatarURL() iconURL: client.user.displayAvatarURL(),
) })
.setTimestamp() .setTimestamp()
.setAuthor( .setAuthor(
interaction.user.tag, interaction.user.tag,
@ -60,11 +60,11 @@ module.exports = {
if (data1.CP <= 0 || !data1.CP) { if (data1.CP <= 0 || !data1.CP) {
interaction.followUp({ interaction.followUp({
embeds: [ embeds: [
new MessageEmbed() new EmbedBuilder()
.setFooter( .setFooter({
`Made by ${client.author}`, text: `Made by ${client.author}`,
client.user.displayAvatarURL() iconURL: client.user.displayAvatarURL(),
) })
.setTimestamp() .setTimestamp()
.setAuthor( .setAuthor(
interaction.user.tag, interaction.user.tag,
@ -97,11 +97,11 @@ module.exports = {
.catch(e => {}); .catch(e => {});
interaction.followUp({ interaction.followUp({
embeds: [ embeds: [
new MessageEmbed() new EmbedBuilder()
.setFooter( .setFooter({
`Made by ${client.author}`, text: `Made by ${client.author}`,
client.user.displayAvatarURL() iconURL: client.user.displayAvatarURL(),
) })
.setTimestamp() .setTimestamp()
.setAuthor( .setAuthor(
interaction.user.tag, interaction.user.tag,
@ -120,11 +120,11 @@ module.exports = {
data1.save(); data1.save();
interaction.followUp({ interaction.followUp({
embeds: [ embeds: [
new MessageEmbed() new EmbedBuilder()
.setFooter( .setFooter({
`Made by ${client.author}`, text: `Made by ${client.author}`,
client.user.displayAvatarURL() iconURL: client.user.displayAvatarURL(),
) })
.setTimestamp() .setTimestamp()
.setAuthor( .setAuthor(
interaction.user.tag, interaction.user.tag,

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
module.exports = { module.exports = {
name: "work", name: "work",
description: "Work to earn money", description: "Work to earn money",
@ -20,7 +20,7 @@ module.exports = {
await client.add(interaction.user.id, earning, interaction); await client.add(interaction.user.id, earning, interaction);
interaction.followUp({ interaction.followUp({
embeds: [ embeds: [
new MessageEmbed() new EmbedBuilder()
.setAuthor( .setAuthor(
interaction.user.tag, interaction.user.tag,
interaction.user.displayAvatarURL({ dynamic: true }) interaction.user.displayAvatarURL({ dynamic: true })
@ -29,7 +29,10 @@ module.exports = {
`Good Job! You worked as a **${job}** and earned **${earning}${client.currency}**` `Good Job! You worked as a **${job}** and earned **${earning}${client.currency}**`
) )
.setTimestamp() .setTimestamp()
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setColor(client.color), .setColor(client.color),
], ],
}); });

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
module.exports = { module.exports = {
name: "ban", name: "ban",
description: "Ban an user", description: "Ban an user",
@ -43,12 +43,15 @@ module.exports = {
interaction.followUp({ content: "You can't ban yourself" }); interaction.followUp({ content: "You can't ban yourself" });
} }
if (reason.length > 1024) reason = reason.slice(0, 1021) + "..."; if (reason.length > 1024) reason = reason.slice(0, 1021) + "...";
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setTitle("User Banned") .setTitle("User Banned")
.addField("**Moderator**", interaction.user.tag, true) .addField("**Moderator**", interaction.user.tag, true)
.addField("**User**", one.tag, true) .addField("**User**", one.tag, true)
.addField("**Reason**", reason, true) .addField("**Reason**", reason, true)
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp() .setTimestamp()
.setThumbnail(interaction.user.displayAvatarURL({ dynamic: true })) .setThumbnail(interaction.user.displayAvatarURL({ dynamic: true }))
.setColor(client.color); .setColor(client.color);
@ -78,7 +81,7 @@ module.exports = {
} }
if (reason.length > 1024) reason = reason.slice(0, 1021) + "..."; if (reason.length > 1024) reason = reason.slice(0, 1021) + "...";
try { try {
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setTitle("User Banned") .setTitle("User Banned")
.addField("**Moderator**", interaction.user.tag, true) .addField("**Moderator**", interaction.user.tag, true)
.addField("**User**", target.user.tag, true) .addField("**User**", target.user.tag, true)
@ -88,7 +91,10 @@ module.exports = {
days.toString(), days.toString(),
true true
) )
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp() .setTimestamp()
.setThumbnail(interaction.user.displayAvatarURL({ dynamic: true })) .setThumbnail(interaction.user.displayAvatarURL({ dynamic: true }))
.setColor(client.color); .setColor(client.color);

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
module.exports = { module.exports = {
name: "kick", name: "kick",
description: "Kick an user", description: "Kick an user",
@ -39,12 +39,15 @@ module.exports = {
} }
if (reason.length > 1024) reason = reason.slice(0, 1021) + "..."; if (reason.length > 1024) reason = reason.slice(0, 1021) + "...";
try { try {
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setTitle("User Kicked") .setTitle("User Kicked")
.addField("**Moderator**", interaction.user.tag, true) .addField("**Moderator**", interaction.user.tag, true)
.addField("**User**", target.user.tag, true) .addField("**User**", target.user.tag, true)
.addField("**Reason**", reason, true) .addField("**Reason**", reason, true)
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp() .setTimestamp()
.setThumbnail(interaction.user.displayAvatarURL({ dynamic: true })) .setThumbnail(interaction.user.displayAvatarURL({ dynamic: true }))
.setColor(client.color); .setColor(client.color);

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
module.exports = { module.exports = {
name: "lockdown", name: "lockdown",
description: "Lock a channel", description: "Lock a channel",
@ -18,14 +18,14 @@ module.exports = {
interaction.channel.permissionOverwrites interaction.channel.permissionOverwrites
.create(interaction.guild.id, { SEND_MESSAGES: false }) .create(interaction.guild.id, { SEND_MESSAGES: false })
.then(() => { .then(() => {
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setTitle("Channel Locked") .setTitle("Channel Locked")
.addField("**Moderator**", interaction.user.tag, true) .addField("**Moderator**", interaction.user.tag, true)
.addField("**Channel**", `<#${interaction.channel.id}>`, true) .addField("**Channel**", `<#${interaction.channel.id}>`, true)
.setFooter( .setFooter({
`Made by ${client.author}`, text: `Made by ${client.author}`,
client.user.displayAvatarURL() iconURL: client.user.displayAvatarURL(),
) })
.setTimestamp() .setTimestamp()
.setThumbnail(interaction.user.displayAvatarURL({ dynamic: true })) .setThumbnail(interaction.user.displayAvatarURL({ dynamic: true }))
.setColor(client.color); .setColor(client.color);
@ -35,14 +35,14 @@ module.exports = {
interaction.channel.permissionOverwrites interaction.channel.permissionOverwrites
.create(interaction.guild.id, { SEND_MESSAGES: true }) .create(interaction.guild.id, { SEND_MESSAGES: true })
.then(() => { .then(() => {
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setTitle("Channel Unlocked") .setTitle("Channel Unlocked")
.addField("**Moderator**", interaction.user.tag, true) .addField("**Moderator**", interaction.user.tag, true)
.addField("**Channel**", `<#${interaction.channel.id}>`, true) .addField("**Channel**", `<#${interaction.channel.id}>`, true)
.setFooter( .setFooter({
`Made by ${client.author}`, text: `Made by ${client.author}`,
client.user.displayAvatarURL() iconURL: client.user.displayAvatarURL(),
) })
.setTimestamp() .setTimestamp()
.setThumbnail(interaction.user.displayAvatarURL({ dynamic: true })) .setThumbnail(interaction.user.displayAvatarURL({ dynamic: true }))
.setColor(client.color); .setColor(client.color);

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
module.exports = { module.exports = {
name: "mute", name: "mute",
description: "Mute an user.", description: "Mute an user.",
@ -65,15 +65,15 @@ module.exports = {
}); });
} else { } else {
await user.roles.add(mutedrole.id); await user.roles.add(mutedrole.id);
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setTitle("User Muted") .setTitle("User Muted")
.addField("**Moderator**", interaction.user.tag, true) .addField("**Moderator**", interaction.user.tag, true)
.addField("**User**", user.user.tag, true) .addField("**User**", user.user.tag, true)
.addField("**Reason**", reason, true) .addField("**Reason**", reason, true)
.setFooter( .setFooter({
`Made by ${client.author}`, text: `Made by ${client.author}`,
client.user.displayAvatarURL() iconURL: client.user.displayAvatarURL(),
) })
.setTimestamp() .setTimestamp()
.setThumbnail(interaction.user.displayAvatarURL({ dynamic: true })) .setThumbnail(interaction.user.displayAvatarURL({ dynamic: true }))
.setColor(client.color); .setColor(client.color);
@ -96,13 +96,16 @@ module.exports = {
}); });
} else { } else {
await user.roles.add(mutedrole.id); await user.roles.add(mutedrole.id);
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setTitle("User Muted") .setTitle("User Muted")
.addField("**Moderator**", interaction.user.tag, true) .addField("**Moderator**", interaction.user.tag, true)
.addField("**User**", user.user.tag, true) .addField("**User**", user.user.tag, true)
.addField("**Time**", utils.ms(utils.ms(time), { long: true }), true) .addField("**Time**", utils.ms(utils.ms(time), { long: true }), true)
.addField("**Reason**", reason, true) .addField("**Reason**", reason, true)
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp() .setTimestamp()
.setThumbnail(interaction.user.displayAvatarURL({ dynamic: true })) .setThumbnail(interaction.user.displayAvatarURL({ dynamic: true }))
.setColor(client.color); .setColor(client.color);

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
module.exports = { module.exports = {
name: "clear", name: "clear",
@ -9,7 +9,7 @@ module.exports = {
description: "Channel where the messages to be deleted", description: "Channel where the messages to be deleted",
type: 7, type: 7,
required: true, required: true,
channelTypes: ["GUILD_TEXT"], channelTypes: [0],
}, },
{ {
name: "amount", name: "amount",
@ -18,7 +18,7 @@ module.exports = {
required: true, required: true,
}, },
], ],
type: "CHAT_INPUT",
run: async (client, interaction, args) => { run: async (client, interaction, args) => {
try { try {
const query = args[1]; const query = args[1];
@ -46,7 +46,7 @@ module.exports = {
const userMessageMap = Object.entries(results); const userMessageMap = Object.entries(results);
channel.send({ channel.send({
embeds: [ embeds: [
new MessageEmbed() new EmbedBuilder()
.setTitle(`Message Cleared`) .setTitle(`Message Cleared`)
.addField( .addField(
"**Moderator**", "**Moderator**",
@ -65,10 +65,10 @@ module.exports = {
.join("\n")}`, .join("\n")}`,
false false
) )
.setFooter( .setFooter({
`Made by ${client.author}`, text: `Made by ${client.author}`,
client.user.displayAvatarURL() iconURL: client.user.displayAvatarURL(),
) })
.setTimestamp() .setTimestamp()
.setThumbnail( .setThumbnail(
interaction.user.displayAvatarURL({ dynamic: true }) interaction.user.displayAvatarURL({ dynamic: true })

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
module.exports = { module.exports = {
name: "role", name: "role",
UserPerms: ["MANAGE_ROLES"], UserPerms: ["MANAGE_ROLES"],
@ -27,11 +27,14 @@ module.exports = {
if (role.managed) { if (role.managed) {
interaction.followUp({ content: "You must provide a non bot role" }); interaction.followUp({ content: "You must provide a non bot role" });
} else if (target.roles.cache.has(role.id)) { } else if (target.roles.cache.has(role.id)) {
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setTitle("Role Removed") .setTitle("Role Removed")
.addField("**Moderator**", interaction.user.tag, true) .addField("**Moderator**", interaction.user.tag, true)
.addField("**User**", target.user.tag, true) .addField("**User**", target.user.tag, true)
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp() .setTimestamp()
.setThumbnail(interaction.user.displayAvatarURL({ dynamic: true })) .setThumbnail(interaction.user.displayAvatarURL({ dynamic: true }))
.setColor(client.color); .setColor(client.color);
@ -39,11 +42,14 @@ module.exports = {
.followUp({ embeds: [embed] }) .followUp({ embeds: [embed] })
.then(await target.roles.remove(role.id)); .then(await target.roles.remove(role.id));
} else { } else {
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setTitle("Role Added") .setTitle("Role Added")
.addField("**Moderator**", interaction.user.tag, true) .addField("**Moderator**", interaction.user.tag, true)
.addField("**User**", target.user.tag, true) .addField("**User**", target.user.tag, true)
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp() .setTimestamp()
.setThumbnail(interaction.user.displayAvatarURL({ dynamic: true })) .setThumbnail(interaction.user.displayAvatarURL({ dynamic: true }))
.setColor(client.color); .setColor(client.color);

View file

@ -28,10 +28,13 @@ module.exports = {
{ label: "6h", value: "6h" }, { label: "6h", value: "6h" },
]); ]);
let row = new Discord.MessageActionRow().addComponents(menu); let row = new Discord.MessageActionRow().addComponents(menu);
const slowmoEmbed = new Discord.MessageEmbed() const slowmoEmbed = new Discord.EmbedBuilder()
.setColor(client.color) .setColor(client.color)
.setTitle("Slowmode") .setTitle("Slowmode")
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp() .setTimestamp()
.setAuthor( .setAuthor(
`Requested by ${interaction.user.tag}`, `Requested by ${interaction.user.tag}`,
@ -56,7 +59,7 @@ module.exports = {
menu.setPlaceholder(`Set to: ${collected.values[0]}`); menu.setPlaceholder(`Set to: ${collected.values[0]}`);
row = new Discord.MessageActionRow().addComponents(menu); row = new Discord.MessageActionRow().addComponents(menu);
if (collected.values[0] !== "OFF") { if (collected.values[0] !== "OFF") {
const embed = new Discord.MessageEmbed() const embed = new Discord.EmbedBuilder()
.setColor("GREEN") .setColor("GREEN")
.setTitle("Slowmode Added") .setTitle("Slowmode Added")
.addField("**Moderator**", interaction.user.tag, true) .addField("**Moderator**", interaction.user.tag, true)
@ -66,25 +69,27 @@ module.exports = {
`${utils.ms(utils.ms(collected.values[0]), { long: true })}`, `${utils.ms(utils.ms(collected.values[0]), { long: true })}`,
true true
) )
.setFooter( .setFooter({
text:
interaction.member.displayName || interaction.user.username, interaction.member.displayName || interaction.user.username,
interaction.user.displayAvatarURL({ dynamic: true }) iconURL: interaction.user.displayAvatarURL({ dynamic: true }),
) })
.setThumbnail(client.user.displayAvatarURL()); .setThumbnail(client.user.displayAvatarURL());
interaction.channel.setRateLimitPerUser( interaction.channel.setRateLimitPerUser(
utils.ms(collected.values[0]) / 1e3 utils.ms(collected.values[0]) / 1e3
); );
return sent.edit({ embeds: [embed], components: [row] }); return sent.edit({ embeds: [embed], components: [row] });
} else { } else {
const embed = new Discord.MessageEmbed() const embed = new Discord.EmbedBuilder()
.setColor("RED") .setColor("RED")
.setTitle("Slowmode Removed") .setTitle("Slowmode Removed")
.addField("**Moderator**", interaction.user.tag, true) .addField("**Moderator**", interaction.user.tag, true)
.addField("**Channel**", `<#${interaction.channel.id}>`, true) .addField("**Channel**", `<#${interaction.channel.id}>`, true)
.setFooter( .setFooter({
text:
interaction.member.displayName || interaction.user.username, interaction.member.displayName || interaction.user.username,
interaction.user.displayAvatarURL({ dynamic: true }) iconURL: interaction.user.displayAvatarURL({ dynamic: true }),
) })
.setThumbnail(client.user.displayAvatarURL()) .setThumbnail(client.user.displayAvatarURL())
.setColor("RED"); .setColor("RED");
interaction.channel.setRateLimitPerUser(0); interaction.channel.setRateLimitPerUser(0);

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
module.exports = { module.exports = {
name: "unban", name: "unban",
description: "Unban an user", description: "Unban an user",
@ -17,11 +17,14 @@ module.exports = {
run: async (client, interaction, args) => { run: async (client, interaction, args) => {
try { try {
const user = await interaction.guild.members.unban(args[0]); const user = await interaction.guild.members.unban(args[0]);
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setTitle("User Unbanned") .setTitle("User Unbanned")
.addField("**Moderator**", interaction.user.tag, true) .addField("**Moderator**", interaction.user.tag, true)
.addField("**User**", user.tag, true) .addField("**User**", user.tag, true)
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp() .setTimestamp()
.setThumbnail(interaction.user.displayAvatarURL({ dynamic: true })) .setThumbnail(interaction.user.displayAvatarURL({ dynamic: true }))
.setColor(client.color); .setColor(client.color);

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
module.exports = { module.exports = {
name: "unmute", name: "unmute",
UserPerms: ["MANAGE_MESSAGES"], UserPerms: ["MANAGE_MESSAGES"],
@ -22,11 +22,14 @@ module.exports = {
interaction.followUp({ content: "Mute role not found in database" }); interaction.followUp({ content: "Mute role not found in database" });
} }
await user.roles.remove(mutedrole); await user.roles.remove(mutedrole);
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setTitle("User Unmuted") .setTitle("User Unmuted")
.addField("**Moderator**", interaction.user.tag, true) .addField("**Moderator**", interaction.user.tag, true)
.addField("**User**", user.user.tag, true) .addField("**User**", user.user.tag, true)
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp() .setTimestamp()
.setThumbnail(interaction.user.displayAvatarURL({ dynamic: true })) .setThumbnail(interaction.user.displayAvatarURL({ dynamic: true }))
.setColor(client.color); .setColor(client.color);

View file

@ -1,6 +1,6 @@
const db = require("../../../models/warns"); const db = require("../../../models/warns");
const moment = require("moment"); const moment = require("moment");
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
module.exports = { module.exports = {
name: "warn", name: "warn",
UserPerms: ["MANAGE_MESSAGES"], UserPerms: ["MANAGE_MESSAGES"],
@ -8,7 +8,7 @@ module.exports = {
category: "Moderation", category: "Moderation",
options: [ options: [
{ {
type: "SUB_COMMAND", type: 1,
name: "add", name: "add",
description: "Warn a user", description: "Warn a user",
options: [ options: [
@ -27,7 +27,7 @@ module.exports = {
], ],
}, },
{ {
type: "SUB_COMMAND", type: 1,
name: "list", name: "list",
description: "Show a list of warnings of an user", description: "Show a list of warnings of an user",
options: [ options: [
@ -40,7 +40,7 @@ module.exports = {
], ],
}, },
{ {
type: "SUB_COMMAND", type: 1,
name: "remove", name: "remove",
description: "Remove a latest warn for an user", description: "Remove a latest warn for an user",
options: [ options: [
@ -59,7 +59,7 @@ module.exports = {
], ],
}, },
{ {
type: "SUB_COMMAND", type: 1,
name: "clear", name: "clear",
description: "Clear an user's warns", description: "Clear an user's warns",
options: [ options: [
@ -125,12 +125,15 @@ module.exports = {
content: `You have been warned in **${interaction.guild.name}** for **${reason}**`, content: `You have been warned in **${interaction.guild.name}** for **${reason}**`,
}) })
.catch(e => {}); .catch(e => {});
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setTitle("User Warned") .setTitle("User Warned")
.addField("**Moderator**", interaction.user.tag, true) .addField("**Moderator**", interaction.user.tag, true)
.addField("**User**", user.user.tag, true) .addField("**User**", user.user.tag, true)
.addField("**Reason**", reason, true) .addField("**Reason**", reason, true)
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp() .setTimestamp()
.setThumbnail(interaction.user.displayAvatarURL({ dynamic: true })) .setThumbnail(interaction.user.displayAvatarURL({ dynamic: true }))
.setColor(client.color); .setColor(client.color);
@ -143,7 +146,7 @@ module.exports = {
if (data.Warns.map(e => e).length > 0) { if (data.Warns.map(e => e).length > 0) {
interaction.followUp({ interaction.followUp({
embeds: [ embeds: [
new MessageEmbed() new EmbedBuilder()
.setTitle(`${user.user.tag}'s warns`) .setTitle(`${user.user.tag}'s warns`)
.setDescription( .setDescription(
data.Warns.map( data.Warns.map(
@ -194,7 +197,7 @@ module.exports = {
if (data) { if (data) {
const number = args[2] - 1; const number = args[2] - 1;
data.Warns.splice(number, 1); data.Warns.splice(number, 1);
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setTitle("Warn Removed") .setTitle("Warn Removed")
.addField("**Moderator**", interaction.user.tag, true) .addField("**Moderator**", interaction.user.tag, true)
.addField("**User**", user.user.tag, true) .addField("**User**", user.user.tag, true)
@ -242,7 +245,7 @@ module.exports = {
}); });
interaction.followUp({ interaction.followUp({
embeds: [ embeds: [
new MessageEmbed() new EmbedBuilder()
.setTitle(`Warns Cleared`) .setTitle(`Warns Cleared`)
.addField("**Moderator**", interaction.user.tag, true) .addField("**Moderator**", interaction.user.tag, true)
.addField("**User**", user.user.tag, true) .addField("**User**", user.user.tag, true)

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
module.exports = { module.exports = {
name: "grab", name: "grab",
description: "Saves the current song to your Direct Messages", description: "Saves the current song to your Direct Messages",
@ -19,7 +19,7 @@ module.exports = {
} }
if (!player) client.err(interaction, "**Nothing is playing right now**"); if (!player) client.err(interaction, "**Nothing is playing right now**");
try { try {
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setAuthor( .setAuthor(
`Song saved: `, `Song saved: `,
"https://cdn.discordapp.com/emojis/897017864085712936.gif" "https://cdn.discordapp.com/emojis/897017864085712936.gif"
@ -41,7 +41,10 @@ module.exports = {
.addField(`🎵 Author: `, `\`${player.queue.current.author}\``, true) .addField(`🎵 Author: `, `\`${player.queue.current.author}\``, true)
.addField(`▶ Play it:`, `\`${player.queue.current.uri}\``) .addField(`▶ Play it:`, `\`${player.queue.current.uri}\``)
.addField(`🔎 Saved in:`, `<#${interaction.channel.id}>`) .addField(`🔎 Saved in:`, `<#${interaction.channel.id}>`)
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()); .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
});
interaction.user.send({ embeds: [embed] }); interaction.user.send({ embeds: [embed] });
} catch (e) { } catch (e) {
console.log(e); console.log(e);

View file

@ -4,13 +4,13 @@ module.exports = {
category: "Music", category: "Music",
options: [ options: [
{ {
type: "SUB_COMMAND", type: 1,
name: "track", name: "track",
description: "Loop the track", description: "Loop the track",
options: [], options: [],
}, },
{ {
type: "SUB_COMMAND", type: 1,
name: "queue", name: "queue",
description: "Loop the whole queue", description: "Loop the whole queue",
options: [], options: [],

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
module.exports = { module.exports = {
name: "nowplaying", name: "nowplaying",
description: "Show now playing music info", description: "Show now playing music info",
@ -21,7 +21,7 @@ module.exports = {
if (!player) client.err(interaction, "**Nothing is playing right now**"); if (!player) client.err(interaction, "**Nothing is playing right now**");
interaction.followUp({ interaction.followUp({
embeds: [ embeds: [
new MessageEmbed() new EmbedBuilder()
.setAuthor( .setAuthor(
`Current song playing:`, `Current song playing:`,
client.user.displayAvatarURL({ client.user.displayAvatarURL({

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
module.exports = { module.exports = {
name: "play", name: "play",
description: "Plays your favourite music from YouTube or Spotify", description: "Plays your favourite music from YouTube or Spotify",
@ -49,7 +49,7 @@ module.exports = {
if (!player.playing && !player.paused && !player.queue.length) { if (!player.playing && !player.paused && !player.queue.length) {
player.play(); player.play();
} }
const SongAddedEmbed = new MessageEmbed() const SongAddedEmbed = new EmbedBuilder()
.setAuthor(`Added to queue`, client.user.displayAvatarURL()) .setAuthor(`Added to queue`, client.user.displayAvatarURL())
.setThumbnail(res.tracks[0].displayThumbnail()) .setThumbnail(res.tracks[0].displayThumbnail())
.setColor(client.color) .setColor(client.color)
@ -73,7 +73,7 @@ module.exports = {
case "PLAYLIST_LOADED": case "PLAYLIST_LOADED":
player.queue.add(res.tracks); player.queue.add(res.tracks);
await player.play(); await player.play();
const SongAdded = new MessageEmbed() const SongAdded = new EmbedBuilder()
.setAuthor( .setAuthor(
`Playlist added to queue`, `Playlist added to queue`,
client.user.displayAvatarURL() client.user.displayAvatarURL()
@ -95,7 +95,7 @@ module.exports = {
const track = res.tracks[0]; const track = res.tracks[0];
player.queue.add(track); player.queue.add(track);
if (!player.playing && !player.paused && !player.queue.length) { if (!player.playing && !player.paused && !player.queue.length) {
const SongAddedEmbed = new MessageEmbed() const SongAddedEmbed = new EmbedBuilder()
.setAuthor(`Added to queue`, client.user.displayAvatarURL()) .setAuthor(`Added to queue`, client.user.displayAvatarURL())
.setThumbnail(track.displayThumbnail()) .setThumbnail(track.displayThumbnail())
.setColor(client.color) .setColor(client.color)
@ -117,7 +117,7 @@ module.exports = {
player.play(); player.play();
interaction.followUp({ embeds: [SongAddedEmbed] }); interaction.followUp({ embeds: [SongAddedEmbed] });
} else { } else {
const SongAddedEmbed = new MessageEmbed() const SongAddedEmbed = new EmbedBuilder()
.setAuthor(`Added to queue`, client.user.displayAvatarURL()) .setAuthor(`Added to queue`, client.user.displayAvatarURL())
.setThumbnail(track.displayThumbnail()) .setThumbnail(track.displayThumbnail())
.setColor(client.color) .setColor(client.color)

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
const { Pagination } = require("cath"); const { Pagination } = require("cath");
module.exports = { module.exports = {
name: "queue", name: "queue",
@ -22,7 +22,7 @@ module.exports = {
} }
if (!player) client.err(interaction, "**Nothing is playing right now**"); if (!player) client.err(interaction, "**Nothing is playing right now**");
if (!player.queue || !player.queue.length || player.queue === 0) { if (!player.queue || !player.queue.length || player.queue === 0) {
const QueueEmbed = new MessageEmbed() const QueueEmbed = new EmbedBuilder()
.setAuthor( .setAuthor(
"Currently playing", "Currently playing",
interaction.user.displayAvatarURL({ dynamic: true }) interaction.user.displayAvatarURL({ dynamic: true })
@ -71,7 +71,7 @@ module.exports = {
}); });
const c = pagination.chunk(mapped, 10).map(x => x.join("\n")); const c = pagination.chunk(mapped, 10).map(x => x.join("\n"));
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setAuthor( .setAuthor(
`Queue for ${interaction.guild.name}`, `Queue for ${interaction.guild.name}`,
interaction.user.displayAvatarURL({ dynamic: true }) interaction.user.displayAvatarURL({ dynamic: true })
@ -104,7 +104,7 @@ module.exports = {
true true
) )
.setTimestamp() .setTimestamp()
.setFooter(`Page 1 of ${c.length}`) .setFooter({ text: `Page 1 of ${c.length}` })
.setThumbnail(player.queue.current.displayThumbnail()); .setThumbnail(player.queue.current.displayThumbnail());
const msg = await interaction.followUp({ const msg = await interaction.followUp({
embeds: [embed], embeds: [embed],

View file

@ -5,7 +5,7 @@ module.exports = {
Owner: true, Owner: true,
options: [ options: [
{ {
type: "SUB_COMMAND", type: 1,
name: "add", name: "add",
description: "Remove coins from someone", description: "Remove coins from someone",
options: [ options: [
@ -24,7 +24,7 @@ module.exports = {
], ],
}, },
{ {
type: "SUB_COMMAND", type: 1,
name: "rmv", name: "rmv",
description: "Remove coins from someone", description: "Remove coins from someone",
options: [ options: [

View file

@ -1,10 +1,10 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
module.exports = { module.exports = {
name: "afk", name: "afk",
description: "Tell someone you are AFK.", description: "Tell someone you are AFK.",
usage: "{Status}", usage: "{Status}",
category: "Utilities", category: "Utilities",
type: "CHAT_INPUT",
options: [ options: [
{ {
type: 3, type: 3,
@ -18,7 +18,7 @@ module.exports = {
const content = args[0] || "No status provided."; const content = args[0] || "No status provided.";
uuser.setNickname(`[AFK] ${interaction.user.username}`).catch(); uuser.setNickname(`[AFK] ${interaction.user.username}`).catch();
await client.data.AFK(interaction.user.id, content); await client.data.AFK(interaction.user.id, content);
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setDescription( .setDescription(
`${interaction.user.username} is set into AFK.\nStatus : ${content}` `${interaction.user.username} is set into AFK.\nStatus : ${content}`
) )

View file

@ -1,13 +1,16 @@
const { MessageEmbed, MessageActionRow, MessageButton } = require("discord.js"); const { EmbedBuilder, MessageActionRow, MessageButton } = require("discord.js");
const draws = require("../../../util/Data/draws.json"); const draws = require("../../../util/Data/draws.json");
module.exports = { module.exports = {
name: "draw", name: "draw",
description: "Buy a lucky draw", description: "Buy a lucky draw",
run: async (client, message, args, utils) => { run: async (client, message, args, utils) => {
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setTitle("**__Daily Lucky Draw__**") .setTitle("**__Daily Lucky Draw__**")
.setColor(client.color) .setColor(client.color)
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp() .setTimestamp()
.setDescription( .setDescription(
"Welcome to the Lucky Draw,\nclick `Spin`, so that the draw spins and hits a random item.\nClick `Info` to find out how high the probability is\n that a particular item will be unlocked" "Welcome to the Lucky Draw,\nclick `Spin`, so that the draw spins and hits a random item.\nClick `Info` to find out how high the probability is\n that a particular item will be unlocked"
@ -60,7 +63,7 @@ module.exports = {
if (i.customId === "spininfo") { if (i.customId === "spininfo") {
i.reply({ i.reply({
embeds: [ embeds: [
new MessageEmbed() new EmbedBuilder()
.setTitle("**__Information Table__**") .setTitle("**__Information Table__**")
.addFields( .addFields(
draws[0].map(c => { draws[0].map(c => {

View file

@ -4,7 +4,7 @@ module.exports = {
usage: "(Emoji)", usage: "(Emoji)",
description: "Show an emoji URL", description: "Show an emoji URL",
category: "Utilities", category: "Utilities",
type: "CHAT_INPUT",
options: [ options: [
{ {
type: 3, type: 3,

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
const moment = require("moment"); const moment = require("moment");
module.exports = { module.exports = {
name: "editsnipe", name: "editsnipe",
@ -10,7 +10,7 @@ module.exports = {
name: "channel", name: "channel",
description: "The sniped channel", description: "The sniped channel",
required: true, required: true,
channelTypes: ["GUILD_TEXT"], channelTypes: [0],
}, },
{ {
type: 4, type: 4,
@ -22,13 +22,16 @@ module.exports = {
run: async (client, interaction, args) => { run: async (client, interaction, args) => {
var i = 0; var i = 0;
let description = ""; let description = "";
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setAuthor( .setAuthor(
`Sniped by ${interaction.user.tag}`, `Sniped by ${interaction.user.tag}`,
interaction.user.displayAvatarURL({ dynamic: true }) interaction.user.displayAvatarURL({ dynamic: true })
) )
.setColor(client.color) .setColor(client.color)
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp() .setTimestamp()
.setURL(client.web); .setURL(client.web);
const snipes = client.esnipes.get(args[0]) || []; const snipes = client.esnipes.get(args[0]) || [];

View file

@ -5,7 +5,7 @@ module.exports = {
UserPerms: ["MANAGE_MESSAGES"], UserPerms: ["MANAGE_MESSAGES"],
options: [ options: [
{ {
type: "SUB_COMMAND", type: 1,
name: "start", name: "start",
description: "Start a giveaway", description: "Start a giveaway",
options: [ options: [
@ -33,7 +33,7 @@ module.exports = {
name: "channel", name: "channel",
description: "The channel of the giveaway", description: "The channel of the giveaway",
required: true, required: true,
channelTypes: ["GUILD_TEXT"], channelTypes: [0],
}, },
{ {
type: 8, type: 8,
@ -53,7 +53,7 @@ module.exports = {
], ],
}, },
{ {
type: "SUB_COMMAND", type: 1,
name: "reroll", name: "reroll",
description: "Reroll a giveaway", description: "Reroll a giveaway",
options: [ options: [
@ -67,7 +67,7 @@ module.exports = {
], ],
}, },
{ {
type: "SUB_COMMAND", type: 1,
name: "end", name: "end",
description: "End a giveaway", description: "End a giveaway",
options: [ options: [

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
const axios = require("axios"); const axios = require("axios");
const { Pagination } = require("cath"); const { Pagination } = require("cath");
module.exports = { module.exports = {
@ -27,7 +27,7 @@ module.exports = {
}); });
} else { } else {
const splittedLyrics = splitlyrics.chunk(lyricsdata.lyrics, 1024); const splittedLyrics = splitlyrics.chunk(lyricsdata.lyrics, 1024);
const lyricsEmbed = new MessageEmbed() const lyricsEmbed = new EmbedBuilder()
.setAuthor(`Lyrics`) .setAuthor(`Lyrics`)
.setColor("YELLOW") .setColor("YELLOW")
.addFields( .addFields(
@ -42,7 +42,7 @@ module.exports = {
} }
) )
.setDescription(splittedLyrics[0]) .setDescription(splittedLyrics[0])
.setFooter(`Page 1 of ${splittedLyrics.length}`) .setFooter({ text: `Page 1 of ${splittedLyrics.length}` })
.setThumbnail(lyricsdata.image) .setThumbnail(lyricsdata.image)
.setTimestamp(); .setTimestamp();
const lyricsMsg = await interaction.followUp({ embeds: [lyricsEmbed] }); const lyricsMsg = await interaction.followUp({ embeds: [lyricsEmbed] });

View file

@ -1,5 +1,5 @@
const schema = require("../../models/modmail"); const schema = require("../../models/modmail");
const { MessageEmbed, MessageAttachment } = require("discord.js"); const { EmbedBuilder, MessageAttachment } = require("discord.js");
const fs = require("fs"); const fs = require("fs");
module.exports = { module.exports = {
name: "modmail", name: "modmail",
@ -18,7 +18,7 @@ module.exports = {
!Object.entries(data.Choices).length || !Object.entries(data.Choices).length ||
!interaction.guild.roles.cache.has(data.Role) || !interaction.guild.roles.cache.has(data.Role) ||
!interaction.guild.channels.cache.find( !interaction.guild.channels.cache.find(
value => value.type == "GUILD_CATEGORY" && value.id === data.Category, value => value.type == "GUILD_CATEGORY" && value.id === data.Category
) )
) { ) {
return interaction.followUp({ return interaction.followUp({
@ -27,15 +27,15 @@ module.exports = {
} }
interaction.deleteReply(); interaction.deleteReply();
const choices = Object.entries(data.Choices); const choices = Object.entries(data.Choices);
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setDescription( .setDescription(
`Choices of topic:\n${choices `Choices of topic:\n${choices
.map(value => `${value[1].emoji} - ${value[1].text}`) .map(value => `${value[1].emoji} - ${value[1].text}`)
.join("\n")}`, .join("\n")}`
) )
.setAuthor( .setAuthor(
interaction.guild.name, interaction.guild.name,
interaction.guild.iconURL({ dynamic: true }), interaction.guild.iconURL({ dynamic: true })
) )
.setColor(client.color) .setColor(client.color)
.setTimestamp() .setTimestamp()
@ -68,8 +68,7 @@ module.exports = {
return interaction.user.send({ return interaction.user.send({
content: "You didn't provide a reaction in-time. Cancelled", content: "You didn't provide a reaction in-time. Cancelled",
}); });
} } else {
else {
const channel = await interaction.guild.channels.create( const channel = await interaction.guild.channels.create(
`${interaction.user.username}-${interaction.user.discriminator}`, `${interaction.user.username}-${interaction.user.discriminator}`,
{ {
@ -77,7 +76,7 @@ module.exports = {
parent: data.Category, parent: data.Category,
topic: `${type[1].text}`, topic: `${type[1].text}`,
type: "text", type: "text",
}, }
); );
const transcript = []; const transcript = [];
channel.permissionOverwrites.create(data.Role, { channel.permissionOverwrites.create(data.Role, {
@ -109,11 +108,11 @@ module.exports = {
channelCollector.stop("done"); channelCollector.stop("done");
fs.writeFileSync( fs.writeFileSync(
`./${interaction.user.id}.txt`, `./${interaction.user.id}.txt`,
transcript.join("\n"), transcript.join("\n")
); );
const attachment = new MessageAttachment( const attachment = new MessageAttachment(
fs.createReadStream(`./${interaction.user.id}.txt`), fs.createReadStream(`./${interaction.user.id}.txt`),
`Transcript-${interaction.user.id}`, `Transcript-${interaction.user.id}`
); );
await channel.send({ await channel.send({
content: "Transcript:", content: "Transcript:",
@ -137,11 +136,11 @@ module.exports = {
channelCollector.stop("done"); channelCollector.stop("done");
fs.writeFileSync( fs.writeFileSync(
`./${interaction.user.id}.txt`, `./${interaction.user.id}.txt`,
transcript.join("\n"), transcript.join("\n")
); );
const attachment = new MessageAttachment( const attachment = new MessageAttachment(
fs.createReadStream(`./${interaction.user.id}.txt`), fs.createReadStream(`./${interaction.user.id}.txt`),
`Transcript-${interaction.user.id}`, `Transcript-${interaction.user.id}`
); );
await channel.send({ await channel.send({
content: "Transcript:", content: "Transcript:",
@ -159,8 +158,7 @@ module.exports = {
}); });
} }
}); });
} } catch (e) {
catch (e) {
console.log(e); console.log(e);
return interaction.followUp({ content: "An error occured" }); return interaction.followUp({ content: "An error occured" });
} }

View file

@ -1,5 +1,5 @@
const { getreddit } = require("cath"); const { getreddit } = require("cath");
const { MessageActionRow, MessageButton, MessageEmbed } = require("discord.js"); const { MessageActionRow, MessageButton, EmbedBuilder } = require("discord.js");
module.exports = { module.exports = {
name: "nsfw", name: "nsfw",
description: "NSFW command", description: "NSFW command",
@ -7,7 +7,7 @@ module.exports = {
const msg = await interaction.channel.send({ content: "Getting images" }); const msg = await interaction.channel.send({ content: "Getting images" });
async function embed() { async function embed() {
if (!interaction.channel.nsfw) { if (!interaction.channel.nsfw) {
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setTitle(`AYO Calm Yo Cheeks`) .setTitle(`AYO Calm Yo Cheeks`)
.setDescription("This command only works in NSFW Channels!") .setDescription("This command only works in NSFW Channels!")
.setImage( .setImage(
@ -59,7 +59,7 @@ module.exports = {
} }
} }
let embed1 = null; let embed1 = null;
embed1 = new MessageEmbed({ embed1 = new EmbedBuilder({
title: data.title, title: data.title,
url: data.url, url: data.url,
image: { url: data.image }, image: { url: data.image },

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
const moment = require("moment"); const moment = require("moment");
module.exports = { module.exports = {
name: "snipe", name: "snipe",
@ -10,7 +10,7 @@ module.exports = {
name: "channel", name: "channel",
description: "The sniped channel", description: "The sniped channel",
required: true, required: true,
channelTypes: ["GUILD_TEXT"], channelTypes: [0],
}, },
{ {
type: 4, type: 4,
@ -22,13 +22,16 @@ module.exports = {
run: async (client, interaction, args) => { run: async (client, interaction, args) => {
var i = 0; var i = 0;
let description = ""; let description = "";
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setAuthor( .setAuthor(
`Sniped by ${interaction.user.tag}`, `Sniped by ${interaction.user.tag}`,
interaction.user.displayAvatarURL({ dynamic: true }) interaction.user.displayAvatarURL({ dynamic: true })
) )
.setColor(client.color) .setColor(client.color)
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp() .setTimestamp()
.setURL(client.web); .setURL(client.web);
const snipes = client.snipes.get(args[0]) || []; const snipes = client.snipes.get(args[0]) || [];

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
const client = require(".."); const client = require("..");
/** /**
* @param {String} message * @param {String} message
@ -198,7 +198,7 @@ module.exports = async (message, dir, file, err) => {
} }
const pull = require(`../../commands/${dir}/${file}`); const pull = require(`../../commands/${dir}/${file}`);
const pre = await client.prefix(message); const pre = await client.prefix(message);
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setAuthor( .setAuthor(
`Error from ${message.author.tag}`, `Error from ${message.author.tag}`,
message.author.displayAvatarURL({ dynamic: true }) message.author.displayAvatarURL({ dynamic: true })
@ -216,7 +216,10 @@ module.exports = async (message, dir, file, err) => {
.setTimestamp() .setTimestamp()
.setThumbnail(client.user.displayAvatarURL({ dynamic: false })) .setThumbnail(client.user.displayAvatarURL({ dynamic: false }))
.setURL(client.web) .setURL(client.web)
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()); .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
});
const msg = await message.reply({ embeds: [embed] }); const msg = await message.reply({ embeds: [embed] });
setTimeout(function () { setTimeout(function () {
msg.delete(); msg.delete();

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
const client = require("../.."); const client = require("../..");
client.on("voiceStateUpdate", async (oldState, newState) => { client.on("voiceStateUpdate", async (oldState, newState) => {
const guildId = newState.guild.id; const guildId = newState.guild.id;
@ -37,7 +37,7 @@ client.on("voiceStateUpdate", async (oldState, newState) => {
switch (stateChange.type) { switch (stateChange.type) {
case "JOIN": case "JOIN":
if (stateChange.members.size === 1 && player.paused) { if (stateChange.members.size === 1 && player.paused) {
const emb = new MessageEmbed() const emb = new EmbedBuilder()
.setAuthor(`Resumed`, client.user.displayAvatarURL()) .setAuthor(`Resumed`, client.user.displayAvatarURL())
.setColor(client.config.color) .setColor(client.config.color)
.setDescription( .setDescription(
@ -50,7 +50,7 @@ client.on("voiceStateUpdate", async (oldState, newState) => {
case "LEAVE": case "LEAVE":
if (stateChange.members.size === 0 && !player.paused && player.playing) { if (stateChange.members.size === 0 && !player.paused && player.playing) {
player.pause(true); player.pause(true);
const emb = new MessageEmbed() const emb = new EmbedBuilder()
.setAuthor(`Paused`, client.user.displayAvatarURL()) .setAuthor(`Paused`, client.user.displayAvatarURL())
.setColor(client.config.color) .setColor(client.config.color)
.setDescription( .setDescription(

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js"); //@night0721 You need to make this const { EmbedBuilder } = require("discord.js"); //@night0721 You need to make this
const items = require("../../util/Data/loadout.json"); const items = require("../../util/Data/loadout.json");
module.exports = { module.exports = {
name: "class", name: "class",
@ -21,9 +21,9 @@ module.exports = {
// slot_3 = slots.next().value, // slot_3 = slots.next().value,
// slot_4 = slots.next().value, // slot_4 = slots.next().value,
// slot_5 = slots.next().value; // slot_5 = slots.next().value;
const result = new MessageEmbed() const result = new EmbedBuilder()
.setColor(client.color) .setColor(client.color)
.setFooter(`Made by ${client.author}`) .setFooter({ text: `Made by ${client.author}` })
.setURL(client.web) .setURL(client.web)
.setTitle(`🎲 A Randomly Generated Loadout 🎲`) .setTitle(`🎲 A Randomly Generated Loadout 🎲`)
.setDescription( .setDescription(

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
const moment = require("moment"); const moment = require("moment");
const axios = require("axios"); const axios = require("axios");
module.exports = { module.exports = {
@ -8,7 +8,7 @@ module.exports = {
category: "CODM", category: "CODM",
options: [ options: [
{ {
type: "SUB_COMMAND", type: 1,
name: "assault_rifle", name: "assault_rifle",
description: "Get a Stats for Assault Rifle", description: "Get a Stats for Assault Rifle",
options: [ options: [
@ -107,7 +107,7 @@ module.exports = {
], ],
}, },
{ {
type: "SUB_COMMAND", type: 1,
name: "sub_machine_gun", name: "sub_machine_gun",
description: "Get a Stats for Sub Machine Gun", description: "Get a Stats for Sub Machine Gun",
options: [ options: [
@ -190,7 +190,7 @@ module.exports = {
], ],
}, },
{ {
type: "SUB_COMMAND", type: 1,
name: "sniper_rifle", name: "sniper_rifle",
description: "Get a Stats for Sniper Rifle", description: "Get a Stats for Sniper Rifle",
options: [ options: [
@ -241,7 +241,7 @@ module.exports = {
], ],
}, },
{ {
type: "SUB_COMMAND", type: 1,
name: "light_machine_gun", name: "light_machine_gun",
description: "Get a Stats for Light Machine Gun", description: "Get a Stats for Light Machine Gun",
options: [ options: [
@ -288,7 +288,7 @@ module.exports = {
], ],
}, },
{ {
type: "SUB_COMMAND", type: 1,
name: "shotgun", name: "shotgun",
description: "Get a Stats for Shotgun", description: "Get a Stats for Shotgun",
options: [ options: [
@ -335,7 +335,7 @@ module.exports = {
], ],
}, },
{ {
type: "SUB_COMMAND", type: 1,
name: "marksman_rifle", name: "marksman_rifle",
description: "Get a Stats for Marksman Rifle", description: "Get a Stats for Marksman Rifle",
options: [ options: [
@ -366,7 +366,7 @@ module.exports = {
], ],
}, },
{ {
type: "SUB_COMMAND", type: 1,
name: "pistol", name: "pistol",
description: "Get a Stats for Pistol", description: "Get a Stats for Pistol",
options: [ options: [
@ -418,18 +418,18 @@ module.exports = {
.catch(e => null); .catch(e => null);
if (!data?.ID) { if (!data?.ID) {
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setDescription( .setDescription(
`<:nyx_not_available:897378400031879188> Sorry, We currently don't have Stats for this Weapon` `<:nyx_not_available:897378400031879188> Sorry, We currently don't have Stats for this Weapon`
) )
.setColor(client.color); .setColor(client.color);
interaction.followUp({ embeds: [embed] }); interaction.followUp({ embeds: [embed] });
} else { } else {
const embed = new MessageEmbed() const embed = new EmbedBuilder()
.setTitle(`${data.author} Statistical Breakdown`) .setTitle(`${data.author} Statistical Breakdown`)
.setColor(16580400) .setColor(16580400)
.setImage(data.imageUrl) .setImage(data.imageUrl)
.setFooter(`Stats Curtosy of Round Table`) .setFooter({ text: `Stats Curtosy of Round Table` })
// .setFooter( // .setFooter(
// `Stats Curtosy of Stats on Duty`, // `Stats Curtosy of Stats on Duty`,
// ) // )

View file

@ -1,6 +1,6 @@
const common = require("../../util/functions/common"); const common = require("../../util/functions/common");
const data = require("../../util/Data/data.json"); const data = require("../../util/Data/data.json");
const { MessageEmbed } = require("discord.js"); const { EmbedBuilder } = require("discord.js");
let currGun, let currGun,
currStats, currStats,
@ -71,7 +71,7 @@ module.exports = {
const recoilImageLink = await chart.getShortUrl(); const recoilImageLink = await chart.getShortUrl();
repEmb.image = { url: recoilImageLink }; repEmb.image = { url: recoilImageLink };
} }
interaction.followUp({ embeds: [new MessageEmbed(repEmb)] }); interaction.followUp({ embeds: [new EmbedBuilder(repEmb)] });
} }
}, },
}; };

View file

@ -1,4 +1,4 @@
const { MessageEmbed, MessageActionRow, MessageButton } = require("discord.js"); const { EmbedBuilder, MessageActionRow, MessageButton } = require("discord.js");
function rndint(max, min) { function rndint(max, min) {
return Math.floor(Math.random() * (max - (min ? min : 0))) + (min ? min : 0); return Math.floor(Math.random() * (max - (min ? min : 0))) + (min ? min : 0);
} }
@ -156,7 +156,7 @@ function cooldown(dbtime, defaults, msg) {
const slowed = slow[Math.floor(Math.random() * slow.length)]; const slowed = slow[Math.floor(Math.random() * slow.length)];
return msg.followUp({ return msg.followUp({
embeds: [ embeds: [
new MessageEmbed() new EmbedBuilder()
.setColor("RANDOM") .setColor("RANDOM")
.setTimestamp() .setTimestamp()
.setTitle(slowed) .setTitle(slowed)
@ -415,11 +415,14 @@ function tips(interaction, client) {
if (ran <= 11) { if (ran <= 11) {
interaction.channel.send({ interaction.channel.send({
embeds: [ embeds: [
new MessageEmbed() new EmbedBuilder()
.setTitle("Tips") .setTitle("Tips")
.setColor(client.color) .setColor(client.color)
.setDescription(`**💡 Did you know**\n${rTip}`) .setDescription(`**💡 Did you know**\n${rTip}`)
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL()) .setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp() .setTimestamp()
.setURL(client.web), .setURL(client.web),
], ],