summary refs log tree commit diff
path: root/commands/help.js
diff options
context:
space:
mode:
authorAmygdala Peanut-Almond <amygdala@almond.desloratadyna.net>2026-04-22 22:49:01 +0200
committerAmygdala Peanut-Almond <amygdala@almond.desloratadyna.net>2026-04-22 22:49:01 +0200
commit3572b97661a3f7c6c29e958b63c20d9f2ef936ac (patch)
treeb3ee056039cf792edd467e5172feee25a07dd56c /commands/help.js
initialise repository
Signed-off-by: Amygdala Peanut-Almond <amygdala@almond.desloratadyna.net>
Diffstat (limited to 'commands/help.js')
-rw-r--r--commands/help.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/commands/help.js b/commands/help.js
new file mode 100644
index 0000000..e65e9ad
--- /dev/null
+++ b/commands/help.js
@@ -0,0 +1,18 @@
+module.exports = {
+	name: 'help',
+	description: "shows the available commands",
+	hidden: false,
+	async execute(message, args) {
+		let out = '';
+
+		globalThis.commands.forEach((cmd) => {
+			if (cmd.hidden) return;
+			out = `${out}${cmd.name} - ${cmd.description}\n`
+		});
+
+		return await message.reply({
+			content: `available commands:\n${out}`
+		});
+	}
+}
+