Compare commits
No commits in common. "fdcb56998c8dd32cee2e5bdbf96ce659301be097" and "f231df89d8393823f87ff64f1cd3018d29175874" have entirely different histories.
fdcb56998c
...
f231df89d8
1
.gitignore
vendored
1
.gitignore
vendored
@ -3,7 +3,6 @@
|
|||||||
package-lock.json
|
package-lock.json
|
||||||
.VSCodeCounter/
|
.VSCodeCounter/
|
||||||
.env*
|
.env*
|
||||||
*.env
|
|
||||||
|
|
||||||
# Custom folders
|
# Custom folders
|
||||||
# gifs/*
|
# gifs/*
|
||||||
|
42
functions.js
42
functions.js
@ -215,44 +215,28 @@ const functions = {
|
|||||||
// Construct the Slash Commands help
|
// Construct the Slash Commands help
|
||||||
|
|
||||||
let slashCommandsFields = [];
|
let slashCommandsFields = [];
|
||||||
let slashSeenNames = new Array();
|
|
||||||
const slashCommandsMap = interaction.client.slashCommands.map(e => {
|
const slashCommandsMap = interaction.client.slashCommands.map(e => {
|
||||||
if (!slashSeenNames.includes(e.data.name)) {
|
return {
|
||||||
slashSeenNames.push(e.data.name);
|
name: e.data.name,
|
||||||
return {
|
description: e.data.description
|
||||||
name: e.data.name,
|
};
|
||||||
description: e.data.description
|
})
|
||||||
};
|
|
||||||
} else {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
for (const e of slashCommandsMap) {
|
for (const e of slashCommandsMap) {
|
||||||
slashCommandsFields.push(`- \`/${e.name}\` - ${e.description}`);
|
slashCommandsFields.push(`- /${e.name} - ${e.description}`);
|
||||||
}
|
}
|
||||||
console.log(slashCommandsFields);
|
|
||||||
|
|
||||||
// Construct the Dot Commands Help
|
// Construct the Dot Commands Help
|
||||||
let dotCommandsFields = new Array();
|
let dotCommandsFields = [];
|
||||||
let dotSeenNames = new Array();
|
|
||||||
const dotCommandsMap = interaction.client.dotCommands.map(e => {
|
const dotCommandsMap = interaction.client.dotCommands.map(e => {
|
||||||
if (!dotSeenNames.includes(e.name)) {
|
return {
|
||||||
dotSeenNames.push(e.name);
|
name: e.name,
|
||||||
return {
|
description: e.description,
|
||||||
name: e.name,
|
usage: e.usage
|
||||||
description: e.description,
|
};
|
||||||
usage: e.usage
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
for (const e of dotCommandsMap) {
|
for (const e of dotCommandsMap) {
|
||||||
if (e != null) {
|
dotCommandsFields.push(`- .${e.name} - ${e.description}\nUsage: ${e.usage}`);
|
||||||
dotCommandsFields.push(`- \`.${e.name}\` - ${e.description} - ${e.usage}`);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
console.log(dotCommandsFields);
|
|
||||||
|
|
||||||
// Construct the Description Fields
|
// Construct the Description Fields
|
||||||
const descriptionFields = [
|
const descriptionFields = [
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"help": {
|
"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.",
|
"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.",
|
"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`"
|
"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": {
|
"emoji": {
|
||||||
"joint": "<:joint:862082955902976000>",
|
"joint": "<:joint:862082955902976000>",
|
||||||
|
Loading…
Reference in New Issue
Block a user