Update to make it work on discord.js v13
* Use intents * Use messageCreate instead of message * Update sending embeds for v13 * Fix getNickname for v13 * Fix user presence * guild.member to guild.members.cache.get * Fix userinfo (+ some other minor changes)
This commit is contained in:
parent
2ac01e2ce1
commit
1ea4892167
11 changed files with 299 additions and 141 deletions
|
@ -4,7 +4,7 @@ if(!fs.existsSync("./data/config.json")) {
|
|||
createInitialConfig();
|
||||
}
|
||||
const Discord = require('discord.js');
|
||||
const client = new Discord.Client({ disableEveryone: true });
|
||||
const client = new Discord.Client({ intents: [Discord.Intents.FLAGS.GUILDS, Discord.Intents.FLAGS.GUILD_MESSAGES, Discord.Intents.FLAGS.GUILD_PRESENCES] });
|
||||
const {
|
||||
globalPrefix,
|
||||
token,
|
||||
|
@ -37,7 +37,7 @@ client.once('disconnect', () => {
|
|||
console.log('Disconnect!');
|
||||
});
|
||||
|
||||
client.on('message', async message => {
|
||||
client.on('messageCreate', async message => {
|
||||
onMessage(client, owners, message, globalPrefix);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue