相关疑难解决方法(0)

升级到 v13 时 Discord.js v12 代码中断

将我的 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 'messageCreate' instead
client.on("message", msg => {})

//Cannot send an empty message
channel.send(user)

//[CLIENT_MISSING_INTENTS] Valid intents must be provided for the client
const client = new Client()

//channel.join is not a function
await channel.join()
Run Code Online (Sandbox Code Playgroud)

这些在 v12 中不会发生,那么我该如何在 v13 中修复它们呢?

javascript discord discord.js

0
推荐指数
1
解决办法
1122
查看次数

标签 统计

discord ×1

discord.js ×1

javascript ×1