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 { Manager } = require("erela.js");
const {
Client,
Collection,
EmbedBuilder,
GatewayIntentBits,
} = require("discord.js");
const config = require("../config");
const Spotify = require("erela.js-spotify");
const utils = require("../util/functions/function");
require("dotenv").config();
class NYX extends Client {
@ -20,18 +22,17 @@ class NYX extends Client {
},
],
},
shard: "auto",
restTimeOffset: 0,
restRequestTimeout: 99999,
partials: ["MESSAGE", "CHANNEL", "REACTION", "GUILD_MEMBER"],
intents: 24207,
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildPresences,
],
}
) {
super(options);
this.slashCommands = new Collection();
this.hide = new Collection();
// this.esnipes = new Collection();
// this.snipes = new Collection();
this.config = config;
this.data = require("../util/functions/mongoose");
this.color = config.color;
@ -54,92 +55,30 @@ class NYX extends Client {
"718762019586572341", // NYX Nation
"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() {
require("../util/dist/handler")(this);
this.login(process.env.TOKEN);
this.data
.connect(process.env.MONGO)
.then(() => console.log("Connected to MongoDB ✅"))
.catch(e => console.log(e));
this.login(process.env.TOKEN);
}
err(c, e) {
const embed = new MessageEmbed()
const embed = new EmbedBuilder()
.setTitle("An Error Occured")
.setColor("RED")
.setDescription(`❌ | ${e}`)
.setTimestamp()
.setFooter(`Made by ${this.author}`, this.user.displayAvatarURL());
.setFooter({
text: `Made by ${this.author}`,
iconURL: this.user.displayAvatarURL(),
});
c.followUp({ embeds: [embed] });
}
se(c, e) {
const embed = new MessageEmbed()
const embed = new EmbedBuilder()
.setColor(this.color)
.setDescription(e)
.setTimestamp();

View file

@ -1,10 +1,9 @@
const { MessageEmbed } = require("discord.js");
const { EmbedBuilder } = require("discord.js");
module.exports = {
name: "sensitivity",
description: "Get the perfect sensitivity for APEXM",
category: "APEX",
usage: "[Ironsight Sensitivity]",
type: "CHAT_INPUT",
options: [
{
type: 3,
@ -15,7 +14,7 @@ module.exports = {
],
run: async (client, interaction, args) => {
if (args[0] > 0 && args[0] < 301) {
const embed = new MessageEmbed()
const embed = new EmbedBuilder()
.setTitle(`Apex Legends Mobile Sensitivity Calculator`)
.setDescription(
`<:nyx_description:897379659665264650> For more info, follow this [Video guide](https://rebrand.ly/apexm-sens) by HawksNest.`
@ -44,7 +43,7 @@ module.exports = {
4x Scope ADS - \`${args[0] * 0.25}\`
6x Scope ADS - \`${args[0] * 0.16}\`
8x Scope ADS - \`${args[0] * 0.12}\`
10x Scope ADS - \`${args[0] * 0.10}\``,
10x Scope ADS - \`${args[0] * 0.1}\``,
inline: false,
}
)
@ -53,7 +52,7 @@ module.exports = {
embeds: [embed],
});
} else {
const embed = new MessageEmbed()
const embed = new EmbedBuilder()
.setDescription(`⚠ **ERROR:** The Sensitivity can be betweeen 0 & 300`)
.setColor(client.color);
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 axios = require("axios");
module.exports = {
name: "build",
description: "Get gunsmith builds",
usage: "[Weapon Name] [Author] [Tag]",
type: "CHAT_INPUT",
category: "CODM",
options: [
{
type: "SUB_COMMAND",
type: 1,
name: "assault_rifle",
description: "Get a gunsmith build for a Assault Rifle",
options: [
@ -152,7 +151,7 @@ module.exports = {
],
},
{
type: "SUB_COMMAND",
type: 1,
name: "sub_machine_gun",
description: "Get a gunsmith build for a Sub Machine Gun",
options: [
@ -275,7 +274,7 @@ module.exports = {
],
},
{
type: "SUB_COMMAND",
type: 1,
name: "sniper_rifle",
description: "Get a gunsmith build for a Sniper Rifle",
options: [
@ -362,7 +361,7 @@ module.exports = {
],
},
{
type: "SUB_COMMAND",
type: 1,
name: "light_machine_gun",
description: "Get a gunsmith build for a Light Machine Gun",
options: [
@ -445,7 +444,7 @@ module.exports = {
],
},
{
type: "SUB_COMMAND",
type: 1,
name: "shotgun",
description: "Get a gunsmith build for a Shotgun",
options: [
@ -524,7 +523,7 @@ module.exports = {
],
},
{
type: "SUB_COMMAND",
type: 1,
name: "marksman_rifle",
description: "Get a gunsmith build for a Marksman Rifle",
options: [
@ -591,7 +590,7 @@ module.exports = {
],
},
{
type: "SUB_COMMAND",
type: 1,
name: "pistol",
description: "Get a gunsmith build for a Pistol",
options: [
@ -674,7 +673,7 @@ module.exports = {
.then(res => res.data)
.catch(e => null);
if (!data?.cwts) {
const embed = new MessageEmbed()
const embed = new EmbedBuilder()
.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`
)
@ -685,7 +684,7 @@ module.exports = {
data.attachments.map((e, i) => {
return arr.push(`**${i + 1}:** ${e}`);
});
const embed = new MessageEmbed()
const embed = new EmbedBuilder()
.setTitle(`${tag} build for ${data.weaponName} from ${data.author}`)
.setDescription(
`<: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 Attachments = require("../../util/Data/attachments.json");
module.exports = {
@ -22,7 +22,7 @@ module.exports = {
slot_3 = slots.next().value,
slot_4 = slots.next().value,
slot_5 = slots.next().value;
const result = new MessageEmbed()
const result = new EmbedBuilder()
.setColor(client.color)
.setTitle(`🎲 A Randomly Generated Class for ${primary_weapon} 🎲`)
.setDescription(
@ -38,7 +38,10 @@ module.exports = {
)}**`
)
.setURL(client.web)
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL())
.setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp();
interaction.followUp({ embeds: [result] });
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");
module.exports = {
name: "loadout",
@ -18,7 +18,7 @@ module.exports = {
const slot_1 = slots.next().value,
slot_2 = slots.next().value,
slot_3 = slots.next().value;
const result = new MessageEmbed()
const result = new EmbedBuilder()
.setColor(client.color)
.setFooter({
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");
module.exports = {
name: "perk",
description: "Get perk stats",
type: "CHAT_INPUT",
usage: "{Perk}",
category: "CODM",
options: [
{
type: "SUB_COMMAND",
type: 1,
name: "red",
description: "Red Perk",
options: [
@ -67,7 +67,7 @@ module.exports = {
],
},
{
type: "SUB_COMMAND",
type: 1,
name: "green",
description: "Green Perk",
options: [
@ -122,7 +122,7 @@ module.exports = {
],
},
{
type: "SUB_COMMAND",
type: 1,
name: "blue",
description: "Blue Perk",
options: [
@ -176,7 +176,7 @@ module.exports = {
run: async (client, interaction, args) => {
const val = args[1];
const d = await c.getperk(val);
const embed = new MessageEmbed()
const embed = new EmbedBuilder()
.setColor(
d.type == "green"
? "09654a"
@ -186,7 +186,10 @@ module.exports = {
? "1047a4"
: client.color
)
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL())
.setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp()
.setTitle(d.perk)
.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");
module.exports = {
name: "scorestreak",
description: "Get Scorestreak stats",
type: "CHAT_INPUT",
usage: "{Scorestreak}",
category: "CODM",
options: [
{
type: "SUB_COMMAND",
type: 1,
name: "lethal",
description: "Lethal Scorestreak",
options: [
@ -83,7 +83,7 @@ module.exports = {
],
},
{
type: "SUB_COMMAND",
type: 1,
name: "support",
description: "Support Scorestreak",
options: [
@ -129,7 +129,7 @@ module.exports = {
run: async (client, interaction, args) => {
const val = args[1];
const d = await c.getscorestreak(val);
const embed = new MessageEmbed()
const embed = new EmbedBuilder()
.setTitle(d.name)
.setURL(d.preview_video)
.setDescription(

View file

@ -1,6 +1,6 @@
const common = require("../../util/functions/common");
const data = require("../../util/Data/data.json");
const { MessageEmbed } = require("discord.js");
const { EmbedBuilder } = require("discord.js");
let currGun,
currStats,
@ -71,7 +71,7 @@ module.exports = {
const recoilImageLink = await chart.getShortUrl();
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 = {
name: "premiumserver",
category: "Config",
@ -38,12 +38,12 @@ module.exports = {
);
interaction.followUp({
embeds: [
new MessageEmbed()
new EmbedBuilder()
.setTitle("Success!")
.setDescription(
`Premium added to **${interaction.guild.name}**! \n`
)
.setFooter("Thank you for supporting Cath!")
.setFooter({ text: "Thank you for supporting Cath!" })
.setColor("GREEN")
.setTimestamp()
.setAuthor(
@ -54,7 +54,7 @@ module.exports = {
});
client.channels.cache.get(client.config.ServerLog).send({
embeds: [
new MessageEmbed()
new EmbedBuilder()
.setTitle("New Premium Server")
.addField(
"Server Info",
@ -86,7 +86,7 @@ module.exports = {
);
interaction.followUp({
embeds: [
new MessageEmbed()
new EmbedBuilder()
.setTitle("Removed!")
.setDescription(
`Premium removed from **${interaction.guild.name}**! \n`
@ -101,7 +101,7 @@ module.exports = {
});
client.channels.cache.get(client.config.ServerLog).send({
embeds: [
new MessageEmbed()
new EmbedBuilder()
.setTitle("Premium Server Removed")
.addField(
"Server Info",

View file

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

View file

@ -1,8 +1,8 @@
const { MessageEmbed } = require("discord.js");
const { EmbedBuilder } = require("discord.js");
module.exports = {
name: "avatar",
description: "Show user's avatar in different formats",
type: "CHAT_INPUT",
usage: "{User}",
category: "Information",
options: [
@ -16,7 +16,7 @@ module.exports = {
run: async (client, interaction, args) => {
const member =
interaction.guild.members.cache.get(args[0]) || interaction.member;
const embed = new MessageEmbed()
const embed = new EmbedBuilder()
.setAuthor({
name: member.user.tag,
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 { utc } = require("moment");
module.exports = {
name: "botinfo",
description: "Check the info of the bot",
category: "Information",
type: "CHAT_INPUT",
run: async (client, interaction) => {
const embed = new MessageEmbed()
const embed = new EmbedBuilder()
.setTitle(`NYX - CODM Gunsmith Bot`)
.setURL(
`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,
};
});
const embed = new Discord.MessageEmbed()
const embed = new Discord.EmbedBuilder()
.setTitle(`**NYX's Commands**`)
.setDescription(`Please choose a category in the dropdown menu`)
.setColor(client.color)
@ -116,7 +116,7 @@ module.exports = {
collector.on("collect", async interaction => {
const [directory] = interaction.values;
const category = categories.find(u => u.directory === directory);
const newembed = new Discord.MessageEmbed()
const newembed = new Discord.EmbedBuilder()
.setTitle(
`${emoji[directory]} ${directory} Commands ${emoji[directory]}`
)
@ -164,7 +164,7 @@ module.exports = {
.map(y => y[0] + y.substring(1, y.length).toLowerCase())
.join(" ")
).join(", ");
const embed = new Discord.MessageEmbed()
const embed = new Discord.EmbedBuilder()
.setTitle(`"${command.name}" command details`)
.addField(
"**Command**:",

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,10 +1,10 @@
const { MessageEmbed } = require("discord.js");
const { EmbedBuilder } = require("discord.js");
module.exports = {
name: "report",
description: "Report a bug of the bot",
category: "Utilities",
type: "CHAT_INPUT",
options: [
{
type: 3,
@ -17,12 +17,15 @@ module.exports = {
const bug = args[0];
interaction.followUp({
embeds: [
new MessageEmbed()
new EmbedBuilder()
.setTitle("SUCCESS!")
.setDescription(
"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()
.setColor("GREEN"),
],
@ -30,7 +33,7 @@ module.exports = {
const ch = client.channels.cache.get(client.config.Report);
ch.send({
embeds: [
new MessageEmbed()
new EmbedBuilder()
.setAuthor(
interaction.user.tag,
interaction.user.displayAvatarURL({ dynamic: true })

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,17 +1,4 @@
const client = require("..");
const version = require("../package.json").version;
const starboardClient = require("../client/StarboardClient");
const g = require("../models/guilds");
client.on("ready", async () => {
client.manager.init(client.user.id);
const data = await g.find();
starboardClient.config.guilds.set(
data.map(x => {
return {
id: x.Guild,
options: { starCount: x.StarCount, starboardChannel: x.Starboard },
};
})
);
console.log(`${client.user.username}`);
});

View file

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

View file

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

View file

@ -1,5 +1,5 @@
const schema = require("../../models/custom-commands");
const { MessageEmbed } = require("discord.js");
const { EmbedBuilder } = require("discord.js");
module.exports = {
name: "cc-list",
@ -10,11 +10,11 @@ module.exports = {
const data = await schema.find({ Guild: message.guild.id });
if (!!data === false) return client.err(messgae, "Config", "cmd-list", 10);
message.channel.send(
new MessageEmbed()
new EmbedBuilder()
.setColor(client.color)
.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) => {
message.delete();
message.channel.send(
new Discord.MessageEmbed()
new Discord.EmbedBuilder()
.setTitle(`Setup | 1/3`)
.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);
function startMessageCollectors(client, message, args) {
@ -22,7 +22,7 @@ module.exports = {
const nameCollector = new Discord.MessageCollector(
message.channel,
nameFilter,
{ max: 999 },
{ max: 999 }
);
nameCollector.on("collect", async msg => {
const name = msg.content.toLowerCase();
@ -44,8 +44,7 @@ module.exports = {
await msg.channel.send("You don't specify a name. Cancelled setup.");
nameCollector.stop();
return;
}
else {
} else {
const newDB = new db({
Guild: message.guild.id,
Command: name,
@ -53,12 +52,12 @@ module.exports = {
await newDB.save();
console.log(newDB);
msg.channel.send(
new Discord.MessageEmbed()
new Discord.EmbedBuilder()
.setTitle(`Setup | 2/3`)
.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();
}
@ -66,7 +65,7 @@ module.exports = {
const responseCollector = new Discord.MessageCollector(
message.channel,
responseFilter,
{ max: 999 },
{ max: 999 }
);
responseCollector.on("collect", async msg => {
const response = msg.content.split("\n");
@ -90,36 +89,36 @@ module.exports = {
data.Response = response;
await db.findOneAndUpdate(
{ Guild: message.guild.id, Command: name },
data,
data
);
console.log(data);
}
},
}
);
msg.channel.send(
new Discord.MessageEmbed()
new Discord.EmbedBuilder()
.setTitle(`Setup | 3/4`)
.setColor(client.color)
.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 randomCollector = new Discord.MessageCollector(
message.channel,
randomFilter,
{ max: 999 },
{ max: 999 }
);
randomCollector.on("collect", async msg => {
let maybe;
if (msg.content.toLowerCase() === "yes") {
msg.channel.send(
new Discord.MessageEmbed()
new Discord.EmbedBuilder()
.setColor(client.color)
.setTitle(`Setup | 4/4`)
.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();
maybe = true;
@ -138,18 +137,18 @@ module.exports = {
Command: name,
Response: response,
},
data,
data
);
console.log(data);
}
},
}
);
console.log(`Random: ${maybe}`);
const deleteeeFilter = m => m.author.id === message.author.id;
const deleteeeCollector = new Discord.MessageCollector(
message.channel,
deleteeeFilter,
{ max: 999 },
{ max: 999 }
);
deleteeeCollector.on("collect", async msg => {
let idkwor;
@ -173,14 +172,14 @@ module.exports = {
Response: response,
Random: maybe,
},
data,
data
);
console.log(data);
msg.reply(
`Saved **${data.Command}** as a custom command`,
`Saved **${data.Command}** as a custom command`
);
}
},
}
);
console.log(`Usage Delete: ${idkwor}`);
}
@ -204,14 +203,14 @@ module.exports = {
Response: response,
Random: maybe,
},
data,
data
);
console.log(data);
msg.reply(
`Saved **${data.Command}** as a custom command`,
`Saved **${data.Command}** as a custom command`
);
}
},
}
);
}
if (msg.content.toLowerCase() === "cancel") {
@ -223,12 +222,12 @@ module.exports = {
}
if (msg.content.toLowerCase() === "no") {
msg.channel.send(
new Discord.MessageEmbed()
new Discord.EmbedBuilder()
.setColor(client.color)
.setTitle(`Setup | 4/4`)
.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();
maybe = false;
@ -247,17 +246,17 @@ module.exports = {
Command: name,
Response: response,
},
data,
data
);
console.log(data);
}
},
}
);
const deleteeFilter = m => m.author.id === message.author.id;
const deleteeCollector = new Discord.MessageCollector(
message.channel,
deleteeFilter,
{ max: 999 },
{ max: 999 }
);
deleteeCollector.on("collect", async msg => {
let idkwor;
@ -280,13 +279,13 @@ module.exports = {
Response: response,
Random: maybe,
},
data,
data
);
msg.reply(
`Saved **${data.Command}** as a custom command`,
`Saved **${data.Command}** as a custom command`
);
}
},
}
);
console.log(`Usage Delete: ${idkwor}`);
}
@ -309,13 +308,13 @@ module.exports = {
Command: name,
Response: response,
},
data,
data
);
msg.reply(
`Saved **${data.Command}** as a custom command`,
`Saved **${data.Command}** as a custom command`
);
}
},
}
);
}
if (msg.content.toLowerCase() === "cancel") {
@ -331,8 +330,7 @@ module.exports = {
return;
}
});
}
else {
} else {
await db.findOne(
{ Guild: message.guild.id, Command: name },
async (err, data) => {
@ -340,26 +338,26 @@ module.exports = {
data.Response = response;
await db.findOneAndUpdate(
{ Guild: message.guild.id, Command: name },
data,
data
);
console.log(data);
}
},
}
);
msg.channel.send(
new Discord.MessageEmbed()
new Discord.EmbedBuilder()
.setTitle(`Setup | 3/3`)
.setColor(client.color)
.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();
const deleteFilter = m => m.author.id === message.author.id;
const deleteCollector = new Discord.MessageCollector(
message.channel,
deleteFilter,
{ max: 999 },
{ max: 999 }
);
deleteCollector.on("collect", async msg => {
let idkwor;
@ -381,13 +379,13 @@ module.exports = {
Command: name,
Response: response,
},
data,
data
);
msg.reply(
`Saved **${data.Command}** as a custom command`,
`Saved **${data.Command}** as a custom command`
);
}
},
}
);
}
if (msg.content.toLowerCase() === "no") {
@ -408,13 +406,13 @@ module.exports = {
Command: name,
Response: response,
},
data,
data
);
msg.reply(
`Saved **${data.Command}** as a custom command`,
`Saved **${data.Command}** as a custom command`
);
}
},
}
);
}
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 = {
name: "migrate",
usage: "(Server ID)",
@ -14,8 +14,7 @@ module.exports = {
await message.guild.emojis.create(e.url, e.name);
});
return message.channel.send(`Created Emotes.`);
}
catch (e) {
} catch (e) {
console.log(e);
}
},

View file

@ -1,5 +1,5 @@
const schema = require("../../models/modmail");
const { Client, Message, MessageEmbed } = require("discord.js");
const { Client, Message, EmbedBuilder } = require("discord.js");
module.exports = {
name: "modmail-category",
@ -8,17 +8,18 @@ module.exports = {
usage: "(Category ID)",
category: "Config",
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(
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);
schema.findOne({ Guild: message.guild.id }, async (err, data) => {
if (data) {
data.Category = category.id;
await schema.findOneAndUpdate({ Guild: message.guild.id }, data);
}
else {
} else {
new schema({
Guild: message.guild.id,
Category: category.id,

View file

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

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js");
const { EmbedBuilder } = require("discord.js");
const { bool } = require("cath");
module.exports = {
name: "bet",
@ -29,10 +29,13 @@ module.exports = {
const multi = (await client.multi(interaction)) / 10 + 1;
await client.add(interaction.user.id, winamt, interaction);
await client.ADDBWin(interaction.user.id);
const abc = new MessageEmbed()
const abc = new EmbedBuilder()
.setColor("GREEN")
.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`)
.addFields(
{
@ -56,10 +59,13 @@ module.exports = {
interaction.followUp({ embeds: [abc] });
} else {
await client.rmv(interaction.user.id, amt);
const cba = new MessageEmbed()
const cba = new EmbedBuilder()
.setColor("RED")
.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`)
.addFields(
{

View file

@ -144,10 +144,13 @@ module.exports = {
dealerMsg += " > " + dealer.score.toString();
}
const gambleEmbed = new Discord.MessageEmbed()
const gambleEmbed = new Discord.EmbedBuilder()
.setColor(cl || client.color)
.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`)
.addField("You", cardsMsg, 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 items = require("../../util/Data/item.json");
module.exports = {
@ -75,7 +75,7 @@ module.exports = {
});
interaction.followUp({
embeds: [
new MessageEmbed()
new EmbedBuilder()
.setTimestamp()
.setDescription(
`**${
@ -90,10 +90,10 @@ module.exports = {
interaction.user.tag,
interaction.user.displayAvatarURL({ dynamic: true })
)
.setFooter(
`Made by ${client.author}`,
client.user.displayAvatarURL()
),
.setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
}),
],
});
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 = {
name: "daily",
description: "Earns daily money",
@ -10,20 +10,23 @@ module.exports = {
if (user) {
if (user.Premium == true) {
money = 20000;
const pre_embed = new MessageEmbed()
const pre_embed = new EmbedBuilder()
.setTitle(`${user.username}'s profile`)
.setDescription(
`Here is your daily **${money}** ${client.currency}\nYou can use this again in 24hrs`
)
.setURL(client.web)
.setColor(client.color)
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL())
.setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp();
await client.add(interaction.user.id, money, interaction);
return interaction.followUp({ embeds: [pre_embed] });
} else {
money = 10000;
const norm_embed = new MessageEmbed()
const norm_embed = new EmbedBuilder()
.setAuthor(
interaction.user.tag,
interaction.user.displayAvatarURL({ dyanmic: true })
@ -33,7 +36,10 @@ module.exports = {
)
.setURL(client.web)
.setColor(client.color)
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL())
.setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp();
await client.add(interaction.user.id, money, interaction);
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 items = require("../../util/Data/item.json");
module.exports = {
@ -72,7 +72,7 @@ module.exports = {
data.Inventory[dbName] -= number;
interaction.followUp({
embeds: [
new MessageEmbed()
new EmbedBuilder()
.setColor(client.color)
.setAuthor(
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 list = require("../../util/Data/gun.json");
module.exports = {
@ -6,7 +6,7 @@ module.exports = {
description: "Configure Weapon Master System settings",
options: [
{
type: "SUB_COMMAND",
type: 1,
name: "select",
description: "Select the gun for the game",
options: [
@ -29,13 +29,13 @@ module.exports = {
],
},
{
type: "SUB_COMMAND",
type: 1,
name: "list",
description: "See the information for the guns",
options: [],
},
{
type: "SUB_COMMAND",
type: 1,
name: "info",
description: "See the stats of your gun",
},
@ -45,9 +45,12 @@ module.exports = {
const lists = list.map(value => {
return `**${value.emoji} ${value.name}**\n**Description**: ${value.description}`;
});
const embed = new MessageEmbed()
const embed = new EmbedBuilder()
.setColor(client.color)
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL())
.setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp()
.setDescription(lists.join("\n\n"));
interaction.followUp({ embeds: [embed] });
@ -101,14 +104,14 @@ module.exports = {
});
} else {
const link = list.find(a => a.name === data.Gun.Name).link;
const embed = new MessageEmbed()
const embed = new EmbedBuilder()
.setThumbnail(link)
.setTimestamp()
.setColor(client.color)
.setFooter(
`Made by ${client.author}`,
client.user.displayAvatarURL()
)
.setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.addField("Name", data.Gun.Name, true)
.addField("Rank", data.Gun.Rank, 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 { Pagination } = require("cath");
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 embed = new MessageEmbed()
const embed = new EmbedBuilder()
.setTimestamp()
.setTitle(`${user.displayName}'s inventory`)
.setColor(client.color)
.setDescription(c[0])
.setFooter(`Page 1 of ${c.length}`);
.setFooter({ text: `Page 1 of ${c.length}` });
try {
const msg = await interaction.followUp({ embeds: [embed] });
if (mappedData.length > 5) {

View file

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

View file

@ -1,9 +1,9 @@
const { MessageEmbed } = require("discord.js");
const { EmbedBuilder } = require("discord.js");
module.exports = {
name: "profile",
usage: "(User)",
description: "Check an user economy profile",
type: "CHAT_INPUT",
options: [
{
type: 6,
@ -21,8 +21,11 @@ module.exports = {
const cmdused = await client.cmdsUSED(user.user.id);
const bal = await client.bal(user.user.id);
const multi = await client.multi(interaction);
const game = new MessageEmbed()
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL())
const game = new EmbedBuilder()
.setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setColor("7196ef")
.setTitle(`${user.displayName}'s profile`)
.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 = {
name: "rich",
description: "Displaying top 10 richest users.",
@ -27,7 +27,7 @@ module.exports = {
const ata = collection.sort((a, b) => b.bal - a.bal).first(10);
interaction.followUp({
embeds: [
new MessageEmbed()
new EmbedBuilder()
.setTitle(`Richest users in ${interaction.guild.name}`)
.setDescription(
ata
@ -38,7 +38,10 @@ module.exports = {
})
.join("\n")
)
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL())
.setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp()
.setColor(client.color),
],

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js");
const { EmbedBuilder } = require("discord.js");
module.exports = {
name: "unban",
description: "Unban an user",
@ -17,11 +17,14 @@ module.exports = {
run: async (client, interaction, args) => {
try {
const user = await interaction.guild.members.unban(args[0]);
const embed = new MessageEmbed()
const embed = new EmbedBuilder()
.setTitle("User Unbanned")
.addField("**Moderator**", interaction.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()
.setThumbnail(interaction.user.displayAvatarURL({ dynamic: true }))
.setColor(client.color);

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js");
const { EmbedBuilder } = require("discord.js");
module.exports = {
name: "unmute",
UserPerms: ["MANAGE_MESSAGES"],
@ -22,11 +22,14 @@ module.exports = {
interaction.followUp({ content: "Mute role not found in database" });
}
await user.roles.remove(mutedrole);
const embed = new MessageEmbed()
const embed = new EmbedBuilder()
.setTitle("User Unmuted")
.addField("**Moderator**", interaction.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()
.setThumbnail(interaction.user.displayAvatarURL({ dynamic: true }))
.setColor(client.color);

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,10 +1,10 @@
const { MessageEmbed } = require("discord.js");
const { EmbedBuilder } = require("discord.js");
module.exports = {
name: "afk",
description: "Tell someone you are AFK.",
usage: "{Status}",
category: "Utilities",
type: "CHAT_INPUT",
options: [
{
type: 3,
@ -18,7 +18,7 @@ module.exports = {
const content = args[0] || "No status provided.";
uuser.setNickname(`[AFK] ${interaction.user.username}`).catch();
await client.data.AFK(interaction.user.id, content);
const embed = new MessageEmbed()
const embed = new EmbedBuilder()
.setDescription(
`${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");
module.exports = {
name: "draw",
description: "Buy a lucky draw",
run: async (client, message, args, utils) => {
const embed = new MessageEmbed()
const embed = new EmbedBuilder()
.setTitle("**__Daily Lucky Draw__**")
.setColor(client.color)
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL())
.setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp()
.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"
@ -60,7 +63,7 @@ module.exports = {
if (i.customId === "spininfo") {
i.reply({
embeds: [
new MessageEmbed()
new EmbedBuilder()
.setTitle("**__Information Table__**")
.addFields(
draws[0].map(c => {

View file

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

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js");
const { EmbedBuilder } = require("discord.js");
const moment = require("moment");
module.exports = {
name: "snipe",
@ -10,7 +10,7 @@ module.exports = {
name: "channel",
description: "The sniped channel",
required: true,
channelTypes: ["GUILD_TEXT"],
channelTypes: [0],
},
{
type: 4,
@ -22,13 +22,16 @@ module.exports = {
run: async (client, interaction, args) => {
var i = 0;
let description = "";
const embed = new MessageEmbed()
const embed = new EmbedBuilder()
.setAuthor(
`Sniped by ${interaction.user.tag}`,
interaction.user.displayAvatarURL({ dynamic: true })
)
.setColor(client.color)
.setFooter(`Made by ${client.author}`, client.user.displayAvatarURL())
.setFooter({
text: `Made by ${client.author}`,
iconURL: client.user.displayAvatarURL(),
})
.setTimestamp()
.setURL(client.web);
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("..");
/**
* @param {String} message
@ -198,7 +198,7 @@ module.exports = async (message, dir, file, err) => {
}
const pull = require(`../../commands/${dir}/${file}`);
const pre = await client.prefix(message);
const embed = new MessageEmbed()
const embed = new EmbedBuilder()
.setAuthor(
`Error from ${message.author.tag}`,
message.author.displayAvatarURL({ dynamic: true })
@ -216,7 +216,10 @@ module.exports = async (message, dir, file, err) => {
.setTimestamp()
.setThumbnail(client.user.displayAvatarURL({ dynamic: false }))
.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] });
setTimeout(function () {
msg.delete();

View file

@ -1,4 +1,4 @@
const { MessageEmbed } = require("discord.js");
const { EmbedBuilder } = require("discord.js");
const client = require("../..");
client.on("voiceStateUpdate", async (oldState, newState) => {
const guildId = newState.guild.id;
@ -37,7 +37,7 @@ client.on("voiceStateUpdate", async (oldState, newState) => {
switch (stateChange.type) {
case "JOIN":
if (stateChange.members.size === 1 && player.paused) {
const emb = new MessageEmbed()
const emb = new EmbedBuilder()
.setAuthor(`Resumed`, client.user.displayAvatarURL())
.setColor(client.config.color)
.setDescription(
@ -50,7 +50,7 @@ client.on("voiceStateUpdate", async (oldState, newState) => {
case "LEAVE":
if (stateChange.members.size === 0 && !player.paused && player.playing) {
player.pause(true);
const emb = new MessageEmbed()
const emb = new EmbedBuilder()
.setAuthor(`Paused`, client.user.displayAvatarURL())
.setColor(client.config.color)
.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");
module.exports = {
name: "class",
@ -21,9 +21,9 @@ module.exports = {
// slot_3 = slots.next().value,
// slot_4 = slots.next().value,
// slot_5 = slots.next().value;
const result = new MessageEmbed()
const result = new EmbedBuilder()
.setColor(client.color)
.setFooter(`Made by ${client.author}`)
.setFooter({ text: `Made by ${client.author}` })
.setURL(client.web)
.setTitle(`🎲 A Randomly Generated Loadout 🎲`)
.setDescription(

View file

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

View file

@ -1,6 +1,6 @@
const common = require("../../util/functions/common");
const data = require("../../util/Data/data.json");
const { MessageEmbed } = require("discord.js");
const { EmbedBuilder } = require("discord.js");
let currGun,
currStats,
@ -71,7 +71,7 @@ module.exports = {
const recoilImageLink = await chart.getShortUrl();
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) {
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)];
return msg.followUp({
embeds: [
new MessageEmbed()
new EmbedBuilder()
.setColor("RANDOM")
.setTimestamp()
.setTitle(slowed)
@ -415,11 +415,14 @@ function tips(interaction, client) {
if (ran <= 11) {
interaction.channel.send({
embeds: [
new MessageEmbed()
new EmbedBuilder()
.setTitle("Tips")
.setColor(client.color)
.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()
.setURL(client.web),
],