久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

得到“輸入意外結(jié)束";在 Javascript 中制作

Got quot;Unexpected end of inputquot; in Javascript when making a Discord Bot(得到“輸入意外結(jié)束;在 Javascript 中制作 Discord Bot)
本文介紹了得到“輸入意外結(jié)束";在 Javascript 中制作 Discord Bot的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

client.on("message", (message) => {
  message.channel.send({
    embed: {
      color: 3447003,
      author: {
        name: client.user.username,
        icon_url: client.user.avatarURL
      },
      title: "commands",
      description: "all current commands",
      fields: [{
        name: "admin only",
        value: "ban"
      },
      {
        name: "moderator only",
        value: "kick"
      },
      {
        name: "everyone",
        value: "ping 
 help 
 invite 
 sinvite 
 gay 
 owner "
      }],
      timestamp: new Date(),
      footer: {
        icon_url: client.user.avatarURL,
        text: "~Isabelle~"
      }
    }
  });
  ^
SyntaxError; Unexpected end of input

我在 node.js 中使用 discord.js,但我不確定是什么導致了這個錯誤.我已經(jīng)嘗試檢查是否有錯別字,但我沒有發(fā)現(xiàn)任何錯別字.幫忙?

I'm using discord.js within node.js, and I'm unsure what's causing this error. I've tried checking back for typos but I haven't caught any. Help?

推薦答案

如注釋中所述,將 }); 添加到代碼的最后.這應該關(guān)閉 client.on 事件監(jiān)聽器.代碼中的最后一個 }); 看起來像是關(guān)閉了那個監(jiān)聽器,直到我用正確的格式編輯了問題.現(xiàn)在你可以知道還需要另一個 });.

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.

感謝@SterlingArcher,我回答了 b/c 我不想再將其視為未回答的問題.

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

這篇關(guān)于得到“輸入意外結(jié)束";在 Javascript 中制作 Discord Bot的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

【網(wǎng)站聲明】本站部分內(nèi)容來源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請聯(lián)系我們刪除處理,感謝您的支持!

相關(guān)文檔推薦

discord.js v12: How do I await for messages in a DM channel?(discord.js v12:我如何等待 DM 頻道中的消息?)
how to make my bot mention the person who gave that bot command(如何讓我的機器人提及發(fā)出該機器人命令的人)
How to fix Must use import to load ES Module discord.js(如何修復必須使用導入來加載 ES 模塊 discord.js)
How to list all members from a specific server?(如何列出來自特定服務器的所有成員?)
Discord bot: Fix ‘FFMPEG not found’(Discord bot:修復“找不到 FFMPEG)
Welcome message when joining discord Server using discord.js(使用 discord.js 加入 discord 服務器時的歡迎消息)
主站蜘蛛池模板: av网站免费| 另类视频在线 | 91精品国产综合久久婷婷香蕉 | 国产一区二区三区四区在线观看 | 日韩欧美二区 | 精品三区 | 中文字幕精品一区 | 一级a爱片性色毛片免费 | 久久国产精品无码网站 | 日韩在线小视频 | www.亚洲区 | 成人午夜影院 | 成人精品视频在线 | 人人插人人| 日韩毛片免费看 | 久久久不卡网国产精品一区 | 日本色综合 | 中文字幕加勒比 | 91成人在线视频 | 欧美激情网站 | 一级黄色片毛片 | 精品国产乱码久久久久久闺蜜 | 粉嫩粉嫩芽的虎白女18在线视频 | 91麻豆精品国产91久久久更新资源速度超快 | 成人av资源在线 | 日韩视频一级 | 天堂中文在线观看 | 欧美综合国产精品久久丁香 | 在线观看成人小视频 | 九九热精品在线 | 国产精品午夜电影 | 一区二区三区亚洲 | 91免费在线 | 就操在线 | 久久久久亚洲 | 久久综合久久久 | 最新黄色毛片 | 插插插干干干 | 亚洲精品一区中文字幕乱码 | 欧洲精品在线观看 | 三级视频网站 |