Use new imports and intents

This commit is contained in:
SileNce5k 2023-12-07 12:51:55 +01:00
parent 4963048bbc
commit 9e41b2336c
No known key found for this signature in database
GPG key ID: 961132EB78C8915F

View file

@ -18,8 +18,8 @@ async function checkAndConvertJSONToSQL(){
}
const createDatabaseTables = require('./server/createDatabaseTables');
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,
@ -31,10 +31,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);