Fix !help crashing

This commit is contained in:
benji7425 2017-04-22 23:09:41 +01:00
parent 60707bd0fb
commit 3b4af16814
1 changed files with 9 additions and 1 deletions

View File

@ -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