From c7fbf25251408b5ac363205003e70f270508b5aa Mon Sep 17 00:00:00 2001 From: SileNce5k Date: Thu, 17 Oct 2024 20:07:35 +0200 Subject: [PATCH] Use new imports and intents --- server.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/server.js b/server.js index 43bbb81..a4f7193 100644 --- a/server.js +++ b/server.js @@ -20,8 +20,8 @@ const createDatabaseTables = require('./server/createDatabaseTables'); const createLastfmTable = require('./server/createLastfmTable'); createLastfmTable(); checkAndConvertJSONToSQL(); -const Discord = require('discord.js'); -const client = new Discord.Client({ intents: [Discord.Intents.FLAGS.GUILDS, Discord.Intents.FLAGS.GUILD_MESSAGES, Discord.Intents.FLAGS.GUILD_PRESENCES] }); +const { Collection, Client, GatewayIntentBits, Partials } = require('discord.js'); +const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent], partials: [Partials.Channel] }); const { globalPrefix, token, @@ -33,10 +33,10 @@ const { presenceText } = require('./data/config.json'); -client.settings = new Discord.Collection(); -client.commands = new Discord.Collection(); -client.serverPrefixes = new Discord.Collection(); -client.netmodules = new Discord.Collection(); +client.settings = new Collection(); +client.commands = new Collection(); +client.serverPrefixes = new Collection(); +client.netmodules = new Collection(); client.settings.set("presenceType", presenceType);