语法错误:输入Discord Bot意外结束

时间:2019-12-01 15:47:56

标签: javascript discord discord.js

at wrapSafe (internal/modules/cjs/loader.js:1043:16)
at Module._compile (internal/modules/cjs/loader.js:1091:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1160:10)
at Module.load (internal/modules/cjs/loader.js:976:32)
at Function.Module._load (internal/modules/cjs/loader.js:884:14)
at Module.require (internal/modules/cjs/loader.js:1016:19)
at require (internal/modules/cjs/helpers.js:69:18)
at C:\Users\salih\Desktop\JoxArea\bot.js:21:17
at Array.forEach (<anonymous>)
at C:\Users\salih\Desktop\JoxArea\bot.js:20:9

我正在编码一个不和谐的bot,但是此处的代码给出了错误。我该如何解决?

files.forEach(f => {
    let props = require(`./komutlar/${f}`);
    log(`Yüklenen komut: ${props.help.name}.`);
    client.commands.set(props.help.name, props);
    props.conf.aliases.forEach(alias => {
      client.aliases.set(alias, props.help.name);
    });
  });
});

1 个答案:

答案 0 :(得分:0)

好像您多了<PongBall>: size: 50, 50 canvas: Ellipse: pos: self.pos size: self.size <PongPaddle>: size: 25, 200 canvas: Rectangle: pos:self.pos size:self.size <PongGame>: ball: pong_ball player1: player_left player2: player_right canvas: Rectangle: pos: self.center_x-5, 0 size: 10, self.height Label: font_size: 70 center_x: root.width / 4 top: root.top - 50 text: str(root.player1.score) Label: font_size: 70 center_x: root.width * 3 / 4 top: root.top - 50 text: str(root.player2.score) PongBall: id: pong_ball center: self.parent.center PongPaddle: id: player_left x: root.x center_y: root.center_y PongPaddle: id: player_right x: root.width-self.width center_y: root.center_y <Manager>: id: screen_manager Screen: name: 'home' Button: text: 'Play Ping Pong' halign: 'center' valign: 'middle' font_size: 100 text_size: self.size on_release: root.current = 'game';game.serve_ball() Screen: name: 'game' PongGame: id: game 。您仅显示两个开括号,但显示关闭三个。