diff --git a/index.js b/index.js index 5888984..8591530 100644 --- a/index.js +++ b/index.js @@ -54,7 +54,7 @@ module.exports = { action: (bot, user, userID, channelID, message) => { bot.sendMessage({ to: Config.channelID, - message: Config.userCommands.join(" + ") + message: "Available commands: " + getValues(Config.userCommands).join(", ") }); }, channelIDs: [Config.channelID] @@ -253,4 +253,12 @@ var Feed = { } }; +var getValues = function (obj) { + var values = []; + for (var value in obj) + if (obj.hasOwnProperty(value)) + values.push(obj[value]); + return values; +}; + var intervalFunc = () => { }; //do nothing by default \ No newline at end of file