Got “Unexpected end of input” in Javascript when making a Discord Bot

后端 未结 1 1959
故里飘歌
故里飘歌 2021-01-27 00:21
client.on(\"message\", (message) => {
  message.channel.send({
    embed: {
      color: 3447003,
      author: {
        name: client.user.username,
        icon_url         


        
1条回答
  •  悲哀的现实
    2021-01-27 00:45

    As mentioned in the comments, add }); to the very end of your code. This should close off the client.on event listener. The final }); in your code looked like it closed off that listener until I edited the question with proper formatting. Now you can tell there is another }); needed.

    Credit goes to @SterlingArcher, I answered b/c I want to stop looking at this as an unanswered question.

    0 讨论(0)
提交回复
热议问题