From 70e66db3c27f0de7eab946439a484e07d163ae5d Mon Sep 17 00:00:00 2001 From: Chen Asraf Date: Tue, 6 Aug 2024 00:32:21 +0300 Subject: [PATCH] docs: add help info --- src/commands/chat.command.ts | 3 ++- src/commands/whitelist.command.ts | 15 +++++++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/commands/chat.command.ts b/src/commands/chat.command.ts index e045f32..594495f 100644 --- a/src/commands/chat.command.ts +++ b/src/commands/chat.command.ts @@ -25,7 +25,8 @@ export default command({ `\`${DEFAULT_COMMAND_PREFIX}chat save\` - backs up the brain immediately`, `\`${DEFAULT_COMMAND_PREFIX}chat size\` - shows the current brain size`, `\`${DEFAULT_COMMAND_PREFIX}chat \` - chat with Venom and immediately get a reply.`, - `\`${DEFAULT_COMMAND_PREFIX}chat whitelist \` - update whitelist for guild/channel.`, + `\`${DEFAULT_COMMAND_PREFIX}chat whitelist \` - get/update whitelist for ` + + `guild/channel (see \`${DEFAULT_COMMAND_PREFIX}help whitelist\` for more information (admins only).`, `\`${CHAT_TRIGGERS[1]}hi!\` - You can also just prefix it with one of the chat prefixes to chat more naturally: \`${CHAT_TRIGGERS.join('`, `')}\`, `, ], execute: async (message, args) => { diff --git a/src/commands/whitelist.command.ts b/src/commands/whitelist.command.ts index 546677c..1ec8e93 100644 --- a/src/commands/whitelist.command.ts +++ b/src/commands/whitelist.command.ts @@ -1,11 +1,22 @@ import { command } from '@/core/commands' +import { DEFAULT_COMMAND_PREFIX } from '@/env' import { manipulateWhitelist } from '@/lib/blacklist' export default command({ command: 'whitelist', aliases: ['wl'], - description: 'Whitelist a channel or guild for commands.', - examples: ['`!whitelist add channel`', '`!whitelist add guild`'], + description: [ + 'Whitelist a channel or guild for commands.', + `Format is \`${DEFAULT_COMMAND_PREFIX}whitelist \``, + 'If you want to whitelist a channel, you need to provide a guild as well.', + 'Whitelisting a channel will not whitelist the guild, and removing a guild from the whitelist will also remove ' + + 'the channel. Effectively, guilds can be turned off completely, while channels have to be selected to be included.', + ].join('\n'), + examples: [ + `\`${DEFAULT_COMMAND_PREFIX}whitelist get channel\` - get status for channel`, + `\`${DEFAULT_COMMAND_PREFIX}whitelist add channel\` - whitelist channel`, + `\`${DEFAULT_COMMAND_PREFIX}whitelist remoce guild\` - remove guild from whitelist`, + ], global: true, adminOnly: true, async execute(message, args) {