bandaged up for d.js 14

This commit is contained in:
Emily 2022-12-06 09:44:25 +11:00
parent 022ec6b999
commit acba68a2d1
4 changed files with 1293 additions and 1362 deletions

3
.gitignore vendored
View File

@ -3,4 +3,5 @@ botconfig.json
Lavalink.jar
logs
*.log
node_modules
node_modules
.vscode

View File

@ -6,12 +6,11 @@ const EventLoader = require('./util/eventLoader');
const EventHandler = require('./util/handlers/eventHandler');
const MessageHandler = require('./util/handlers/messageHandler');
const Functions = require('./util/functions');
const Database = require('./util/database');
// const Database = require('./util/database');
const Logger = require('./util/logger');
const sentry = require('@sentry/node');
const config = require('../botconfig.json');
const version = require('../package.json').version;
class WoomyClient extends Discord.Client {
constructor (options) {
super(options);
@ -24,7 +23,7 @@ class WoomyClient extends Discord.Client {
// Essential modules
this.logger = Logger;
this.MessageEmbed = Discord.MessageEmbed;
this.db = new Database(this);
//this.db = new Database(this);
this.functions = new Functions(this);
this.commandLoader = new CommandLoader(this);
this.eventLoader = new EventLoader(this);
@ -50,7 +49,7 @@ class WoomyClient extends Discord.Client {
this.on('voiceStateUpdate', this.runVoiceStateUpdateModules);
}
// Recieves information from the per-event listeners, and passes on needed information to the handler
// Receives information from the per-event listeners, and passes on needed information to the handler
mainEventListener (wsEvent, param_1, param_2) {
try {
this.eventHandler.handle(wsEvent, param_1, param_2);
@ -97,16 +96,20 @@ class WoomyClient extends Discord.Client {
// Initialize our client
const client = new WoomyClient({
shards: 'auto',
partials: [
Discord.Partials.Reaction,
],
intents: [
'GUILDS',
'GUILD_MEMBERS',
'GUILD_EMOJIS',
'GUILD_VOICE_STATES',
'GUILD_MESSAGES',
'DIRECT_MESSAGES',
'GUILD_MESSAGE_REACTIONS',
Discord.GatewayIntentBits.Guilds,
Discord.GatewayIntentBits.GuildMembers,
Discord.GatewayIntentBits.GuildEmojisAndStickers,
Discord.GatewayIntentBits.GuildVoiceStates,
Discord.GatewayIntentBits.GuildMessages,
Discord.GatewayIntentBits.MessageContent,
Discord.GatewayIntentBits.GuildMessageReactions,
]
});
// Extensions of native javascript types, *not good practice* but they're useful
require('./util/prototypes');
@ -115,7 +118,7 @@ client.commandLoader.loadCommands();
client.eventLoader.loadEventModules();
client.createEventListeners();
// Development mode is set in botconfig.yml, and disables some stuff if enabled. Imagine how messy Sentry would be without this!
// Development mode is set in botconfig.json
if (client.config.developmentMode === false) {
try {
sentry.init({ dsn: client.config.keys.sentry });

2615
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -4,15 +4,15 @@
"description": "Made with <3 by mudkipscience",
"main": "index.js",
"dependencies": {
"@sentry/node": "^6.9.0",
"@sentry/node": "^7.23.0",
"bufferutil": "^4.0.3",
"chalk": "^4.1.0",
"chalk": "^4.1.2",
"dayjs": "^1.10.6",
"discord.js": "^13.0.0-dev.1dcad05.1626134620",
"discord.js": "^14.7.1",
"erlpack": "^0.1.3",
"eslint": "^7.30.0",
"eslint": "^8.29.0",
"fs-readdir-recursive": "^1.1.0",
"node-fetch": "^2.6.1",
"node-fetch": "^2.6.7",
"pg": "^8.5.1",
"pg-format": "^1.0.4",
"pretty-ms": "^7.0.1",