0
/rbd/pnpm-volume/2811df58-f303-40d7-8428-560fac0ef517/node_modules/.registry.npmjs.org/discord.js/12.1.1/node_modules/discord.js/src/client/Client.js:41
    } catch {
            ^
SyntaxError: Unexpected token {
    at createScript (vm.js:80:10)
    at Object.runInThisContext (vm.js:139:10)
    at Module._compile (module.js:617:28)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/rbd/pnpm-volume/2811df58-f303-40d7-8428-560fac0ef517/node_modules/.registry.npmjs.org/discord.js/12.1.1/node_modules/discord.js/src/index.js:8:11)

当我升级 my bot's discord.js到 12.1.1 时,它对我说。它通常与 discord.js 11.4.2 一起运行,但我的机器人运行不完美。请帮我。

4

1 回答 1

1

如果您刚刚将代码从 Discord.js 11.4.2 升级到 12 及更高版本,您应该检查更新指南,以确保您没有任何已弃用/损坏的代码。

于 2020-04-07T00:55:34.513 回答