added about command, fixed help command output

This commit is contained in:
Bryson Steck 2022-03-11 23:28:10 -07:00
parent b5603f9b22
commit ced9b6a44f

View file

@ -53,16 +53,15 @@ function commands (target, commandName, user, mods) {
if (mods.indexOf(user) >= 0) isMod = true; if (mods.indexOf(user) >= 0) isMod = true;
if (commandName === "help") { if (commandName === "help") {
var allCommands = []; var finalString = settings.command_char + "help " + settings.command_char + "about ";
var finalString = "";
chat_commands.forEach(command => { chat_commands.forEach(command => {
allCommands.push(command.command);
});
allCommands.forEach(command => {
finalString = finalString + settings.command_char + command.command + " "; finalString = finalString + settings.command_char + command.command + " ";
}); });
client.say(target, `Here is the list of commands: ${finalString}`); client.say(target, `Here is the list of commands: ${finalString}`);
valid = true; valid = true;
} else if (commandName === "about") {
client.say(target, `This bot was stolen from https://github.com/brysonsteck/lset under the MIT License and configured by your streamer, ${settings.your_username}!`);
valid = true;
} else { } else {
chat_commands.forEach(command => { chat_commands.forEach(command => {
if (commandName.search(command.command) !== -1) { if (commandName.search(command.command) !== -1) {