我正在创建一个JSON文件来存放命令的信息。JSON需要帮助
JSON文件保存了命令触发和repsonse,我有一个文件中,但我想添加更多,但是当我做我得到一个错误
{
"trigger": "twitter",
"repsonse": "https://www.twitter.com/Fhaelin"
}
{
"trigger": "test",
"repsonse": "This is a test command"
}
我抛出错误,我不知道为什么
下面是我用读它的代码:
bot.on("message", function(message) {
var input = message.content.toLowerCase();
if (input === prefix + Commands.trigger)
{
bot.sendMessage(message, message.author + " : " + Commands.repsonse)
}
})
整个代码 http://hastebin.com/punabobisu.coffee
共享控制台错误 –
代码在哪里?什么是错误? – undefined
Heres a screenhot http://prntscr.com/blba5m – AcidzDesigns