Use new imports and intents
This commit is contained in:
parent
0c937951ad
commit
c7fbf25251
1 changed files with 6 additions and 6 deletions
12
server.js
12
server.js
|
@ -20,8 +20,8 @@ const createDatabaseTables = require('./server/createDatabaseTables');
|
||||||
const createLastfmTable = require('./server/createLastfmTable');
|
const createLastfmTable = require('./server/createLastfmTable');
|
||||||
createLastfmTable();
|
createLastfmTable();
|
||||||
checkAndConvertJSONToSQL();
|
checkAndConvertJSONToSQL();
|
||||||
const Discord = require('discord.js');
|
const { Collection, Client, GatewayIntentBits, Partials } = require('discord.js');
|
||||||
const client = new Discord.Client({ intents: [Discord.Intents.FLAGS.GUILDS, Discord.Intents.FLAGS.GUILD_MESSAGES, Discord.Intents.FLAGS.GUILD_PRESENCES] });
|
const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent], partials: [Partials.Channel] });
|
||||||
const {
|
const {
|
||||||
globalPrefix,
|
globalPrefix,
|
||||||
token,
|
token,
|
||||||
|
@ -33,10 +33,10 @@ const {
|
||||||
presenceText
|
presenceText
|
||||||
} = require('./data/config.json');
|
} = require('./data/config.json');
|
||||||
|
|
||||||
client.settings = new Discord.Collection();
|
client.settings = new Collection();
|
||||||
client.commands = new Discord.Collection();
|
client.commands = new Collection();
|
||||||
client.serverPrefixes = new Discord.Collection();
|
client.serverPrefixes = new Collection();
|
||||||
client.netmodules = new Discord.Collection();
|
client.netmodules = new Collection();
|
||||||
|
|
||||||
|
|
||||||
client.settings.set("presenceType", presenceType);
|
client.settings.set("presenceType", presenceType);
|
||||||
|
|
Loading…
Add table
Reference in a new issue