繁体   English   中英

DisallowedIntents 如果我在终端中运行 discord 机器人

[英]DisallowedIntents if im run discord bot in terminal

const { 客户端,GatewayIntentBits } = 要求(“discord.js”);

    const client = new Client({

    intents: [
GatewayIntentBits.Guilds, //all problem here
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildMembers,

     ],

     });


     client.login("TOKEN");
     

您会遇到此问题,因为您正在访问特权意图。 要将此 go 修复为https://discord.com/developers/applications/ ,请单击您的机器人。 然后 go 到 bot 部分并向下滚动到 Privileged Gateway Intents。 启用服务器成员和消息内容意图。 之后,它应该被修复。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM