2022-10-26 12:38:28 +02:00
|
|
|
const {
|
|
|
|
Client,
|
|
|
|
Collection,
|
|
|
|
EmbedBuilder,
|
|
|
|
GatewayIntentBits,
|
2022-10-27 22:00:04 +02:00
|
|
|
Partials,
|
2022-10-26 12:38:28 +02:00
|
|
|
} = require("discord.js");
|
2021-11-18 18:56:42 +01:00
|
|
|
const config = require("../config");
|
|
|
|
require("dotenv").config();
|
|
|
|
|
|
|
|
class NYX extends Client {
|
|
|
|
/**
|
|
|
|
* @param {Client.options} options
|
|
|
|
*/
|
|
|
|
constructor(
|
|
|
|
options = {
|
|
|
|
presence: {
|
|
|
|
activities: [
|
|
|
|
{
|
2022-01-08 01:07:13 +01:00
|
|
|
name: `/help`,
|
2022-10-27 22:00:04 +02:00
|
|
|
type: 1,
|
2021-11-18 18:56:42 +01:00
|
|
|
url: "https://www.youtube.com/watch?v=YSKDu1gKntY",
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
2022-10-27 22:00:04 +02:00
|
|
|
shards: "auto",
|
|
|
|
partials: [
|
|
|
|
Partials.Message,
|
|
|
|
Partials.Channel,
|
|
|
|
Partials.Reaction,
|
|
|
|
Partials.GuildMember,
|
|
|
|
],
|
2022-10-26 12:38:28 +02:00
|
|
|
intents: [
|
|
|
|
GatewayIntentBits.Guilds,
|
2023-04-02 14:12:53 +02:00
|
|
|
GatewayIntentBits.GuildMembers,
|
|
|
|
GatewayIntentBits.MessageContent,
|
|
|
|
GatewayIntentBits.GuildMessages,
|
|
|
|
GatewayIntentBits.DirectMessageTyping,
|
|
|
|
GatewayIntentBits.DirectMessages,
|
2022-10-26 12:38:28 +02:00
|
|
|
],
|
2021-11-18 18:56:42 +01:00
|
|
|
}
|
|
|
|
) {
|
|
|
|
super(options);
|
|
|
|
this.slashCommands = new Collection();
|
|
|
|
this.hide = new Collection();
|
|
|
|
this.config = config;
|
|
|
|
this.data = require("../util/functions/mongoose");
|
|
|
|
this.color = config.color;
|
|
|
|
this.author = "Team NYX";
|
|
|
|
this.invite = "https://discord.gg/SbQHChmGcp";
|
|
|
|
this.docs = "https://thunder75.gitbook.io/nyx/";
|
|
|
|
this.web = config.URL;
|
|
|
|
this.owners = [
|
|
|
|
"452076196419600394", // Night
|
|
|
|
"534027706325532694", // Cat drinking a cat
|
|
|
|
"381442059111759883", // Thunder
|
|
|
|
"556808365574193194", // chunchunmaru
|
|
|
|
"746753527338238115", // mightyful
|
|
|
|
];
|
2021-12-09 20:38:01 +01:00
|
|
|
this.currency = "<:nyx_currency:918584872333893703>";
|
2021-11-18 18:56:42 +01:00
|
|
|
this.xp = "<:nyx_xp:900309007472926720>";
|
|
|
|
this.path = [
|
|
|
|
"614423108388126731", // Camper on Duty
|
|
|
|
"767173194943168542", // Dark Bonker
|
|
|
|
"718762019586572341", // NYX Nation
|
|
|
|
"840225563193114624", // Command Test
|
|
|
|
];
|
|
|
|
}
|
2022-10-26 12:38:28 +02:00
|
|
|
|
2021-11-18 18:56:42 +01:00
|
|
|
start() {
|
|
|
|
require("../util/dist/handler")(this);
|
2022-10-26 12:38:28 +02:00
|
|
|
this.login(process.env.TOKEN);
|
2021-11-18 18:56:42 +01:00
|
|
|
this.data
|
|
|
|
.connect(process.env.MONGO)
|
|
|
|
.then(() => console.log("Connected to MongoDB ✅"))
|
|
|
|
.catch(e => console.log(e));
|
|
|
|
}
|
2023-04-02 14:12:53 +02:00
|
|
|
err(interaction, error) {
|
2022-10-26 12:38:28 +02:00
|
|
|
const embed = new EmbedBuilder()
|
2021-11-18 18:56:42 +01:00
|
|
|
.setTitle("An Error Occured")
|
2023-02-03 23:28:45 +01:00
|
|
|
.setColor("Red")
|
2023-04-02 14:12:53 +02:00
|
|
|
.setDescription(`❌ | ${error}`)
|
2021-11-18 18:56:42 +01:00
|
|
|
.setTimestamp()
|
2022-10-26 12:38:28 +02:00
|
|
|
.setFooter({
|
|
|
|
text: `Made by ${this.author}`,
|
2023-04-02 14:12:53 +02:00
|
|
|
iconURL: this.user.displayAvatarURL({ dynamic: true }),
|
2022-10-26 12:38:28 +02:00
|
|
|
});
|
2023-04-02 14:12:53 +02:00
|
|
|
interaction.channel.send({ embeds: [embed] });
|
|
|
|
this.channels.cache.get(this.config.ErrorLog).send({ embeds: [embed] });
|
2021-11-18 18:56:42 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = NYX;
|