Compare commits

..

2 Commits

Author SHA1 Message Date
fdcb56998c Ignore new env format
All checks were successful
NodBot Production Dockerization / build (pull_request) Successful in 6s
2024-09-23 22:02:01 -04:00
28443611e4 Vastly improved the /help command 2024-09-23 22:01:19 -04:00
3 changed files with 33 additions and 16 deletions

1
.gitignore vendored
View File

@ -3,6 +3,7 @@
package-lock.json
.VSCodeCounter/
.env*
*.env
# Custom folders
# gifs/*

View File

@ -215,28 +215,44 @@ const functions = {
// Construct the Slash Commands help
let slashCommandsFields = [];
let slashSeenNames = new Array();
const slashCommandsMap = interaction.client.slashCommands.map(e => {
if (!slashSeenNames.includes(e.data.name)) {
slashSeenNames.push(e.data.name);
return {
name: e.data.name,
description: e.data.description
};
})
for (const e of slashCommandsMap) {
slashCommandsFields.push(`- /${e.name} - ${e.description}`);
} else {
return null;
}
});
for (const e of slashCommandsMap) {
slashCommandsFields.push(`- \`/${e.name}\` - ${e.description}`);
}
console.log(slashCommandsFields);
// Construct the Dot Commands Help
let dotCommandsFields = [];
let dotCommandsFields = new Array();
let dotSeenNames = new Array();
const dotCommandsMap = interaction.client.dotCommands.map(e => {
if (!dotSeenNames.includes(e.name)) {
dotSeenNames.push(e.name);
return {
name: e.name,
description: e.description,
usage: e.usage
};
} else {
return null;
}
});
for (const e of dotCommandsMap) {
dotCommandsFields.push(`- .${e.name} - ${e.description}\nUsage: ${e.usage}`);
if (e != null) {
dotCommandsFields.push(`- \`.${e.name}\` - ${e.description} - ${e.usage}`);
}
}
console.log(dotCommandsFields);
// Construct the Description Fields
const descriptionFields = [

View File

@ -1,8 +1,8 @@
{
"help": {
"description": "Hi there! Thanks for checking out NodBot. NodBot is used in two distinct ways: with 'Slash Commands' (/help), and with 'Dot Commands' (nod.gif). The two types will be outlined below, along with usage examples.",
"slash": "Slash Commands always begin with a / and a menu will pop up to help complete the commands.",
"dot": "Dot Commands have the command at the end of the message, for example to search for a gif of 'nod', type 'nod.gif'"
"description": "Hi there! Thanks for checking out NodBot. NodBot is used in two distinct ways: with 'Slash Commands' (`/help`), and with 'Dot Commands' (`nod.gif`). The two types will be outlined below, along with usage examples.",
"slash": "Slash Commands always begin with a `/` and a menu will pop up to help complete the commands.",
"dot": "Dot Commands have the command at the end of the message, for example to search for a gif of `nod`, type `nod.gif`"
},
"emoji": {
"joint": "<:joint:862082955902976000>",