Fix !help crashing
This commit is contained in:
parent
60707bd0fb
commit
3b4af16814
10
index.js
10
index.js
|
@ -54,7 +54,7 @@ module.exports = {
|
||||||
action: (bot, user, userID, channelID, message) => {
|
action: (bot, user, userID, channelID, message) => {
|
||||||
bot.sendMessage({
|
bot.sendMessage({
|
||||||
to: Config.channelID,
|
to: Config.channelID,
|
||||||
message: Config.userCommands.join(" + ")
|
message: "Available commands: " + getValues(Config.userCommands).join(", ")
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
channelIDs: [Config.channelID]
|
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
|
var intervalFunc = () => { }; //do nothing by default
|
Loading…
Reference in a new issue