discord.js上的不一致缺少意图错误 [英] Discord Missing Intent Error on discord.js
本文介绍了discord.js上的不一致缺少意图错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
这是我的起始代码,我不知道我做错了什么
const Discord = require('discord.js'),
welcome = require('./welcome'),
mute = require('./mute'),
unmute = require('./unmute'),
mongoose = require('mongoose'),
Levels = require("discord-xp")
const { Client, Intents } = require("discord.js");
const client = new Client({
intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES],
});
推荐答案
您确实遗漏了Intent
。根据您的代码,您可能已经知道,discord.js的V13要求您添加某些意图,以避免将处理能力浪费在不使用的特性上。
您可以查看所有可用的方法here,并尝试添加几种方法,以确定您需要哪一种方法。根据您的代码,我看不出您遗漏了哪一个。
这篇关于discord.js上的不一致缺少意图错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文