명령 정보를 보관할 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 screenshot http://prntscr.com/blba5m – AcidzDesigns