我正在尝试发送一条嵌入消息,这是我在发送嵌入之前编写的。不幸的是这不起作用。我输入的消息被删除了,但是嵌入没有发送,我得到了一个错误代码。
这是我的剧本:
case 'a':
case 'A':
let part = message.content.split(" ");
if(!message.member.permissions.has(Discord.Permissions.FLAGS.MANAGE_ROLES)) return;
if(!part[1]) r
当用户发送命令时,我试图创建一个invite。这过去在v12 of Discord.js中很好,但似乎不再适用于v13。
我已经阅读了这些文档,并且在新版本中很难找到如何做到这一点。现在,我收到一个错误(我使用的是类型记录),上面写着:
属性“createInvite”不存在于'DMChannel、PartialDMChannel、PartialDMChannel、NewsChannel、TextChannel、TextChannel、ThreadChannel、VoiceChannel‘类型中。
如何在v13 of DiscordJS中的当前通道中创建一个邀请?
client
一般来说,我对编码是个新手,所以请期待nooby的行为。 我的Discord机器人与命令节点联机。我尝试了一下!ping命令,一切都很正常。但是,当我尝试使用声明的命令!play从YT播放视频时,当我按enter键时,机器人崩溃并显示日志: const connection = await voiceChannel.join();
^
TypeError: voiceChannel.join is not a function
at Object.execute (D:\Discord
我使用Discord.js v13创建了bot,但它始终发生以下错误:
TypeError: (intermediate value).setName(...).setDescription(...).addSubCommand is not a function
at Object.<anonymous> (C:\Users\SAMSUNG\Desktop\ReedM\commands\play.js:10:10)
at Module._compile (node:internal/modules/cjs/loader:1205:14)
at Module
在将我的discord.js更新到v13时,我收到许多错误: //member.hasPermission is not a function
member.hasPermission("SEND_MESSAGES")
//Cannot send an empty message
channel.send(someEmbed)
//Cannot send an empty message
channel.send({embed: someEmbed})
//Warning: The 'message' event was deprecated, use