Update discord.js dependency to version 14 (#116)

* Update discord.js in package.json to v14.16.3 & update package-lock.json

* Update all embeds to work with v14

* Do not show discriminator if it is 0
This commit is contained in:
SileNce5k 2024-10-22 07:36:10 +02:00
parent c751a5aec2
commit 062e6d43dc
Signed by: SileNce
GPG key ID: B0A142BB4291B204
14 changed files with 1306 additions and 2437 deletions

View file

@ -20,8 +20,13 @@ 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,
GatewayIntentBits.GuildMembers,
GatewayIntentBits.GuildPresences
], partials: [Partials.Channel] });
const {
globalPrefix,
token,
@ -33,10 +38,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);