Upgrade discord.js from v13 to v14

This commit is contained in:
2022-08-18 11:26:51 +02:00
parent f93176a709
commit 317230c9c3
10 changed files with 710 additions and 384 deletions

View File

@@ -1,7 +1,7 @@
require("dotenv").config();
const { Console } = require("console");
const fs = require("fs");
const {Client, Intents, Collection} = require("discord.js");
const {Client, GatewayIntentBits, Collection} = require("discord.js");
const dbUtil = require("./util/db")
const logger = new Console({
@@ -9,10 +9,10 @@ const logger = new Console({
stderr: process.stderr
});
const client = new Client({intents: [
Intents.FLAGS.GUILDS,
Intents.FLAGS.GUILD_MESSAGES,
Intents.FLAGS.GUILD_MEMBERS,
Intents.FLAGS.GUILD_PRESENCES
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.GuildPresences,
GatewayIntentBits.GuildMembers
]});
const commandFiles = fs.readdirSync("./commands").filter(file => file.endsWith(".js"));