Skip to content

Commit

Permalink
fix: add better description for blocked word and token command
Browse files Browse the repository at this point in the history
  • Loading branch information
virtual-designer committed Aug 2, 2023
1 parent c726e7c commit 66d88ec
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 4 deletions.
31 changes: 31 additions & 0 deletions src/commands/automation/RemindCommand.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
/**
* This file is part of SudoBot.
*
* Copyright (C) 2021-2023 OSN Developers.
*
* SudoBot is free software; you can redistribute it and/or modify it
* under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SudoBot is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with SudoBot. If not, see <https://www.gnu.org/licenses/>.
*/

import { EmbedBuilder, PermissionsBitField } from "discord.js";
import Command, { AnyCommandContext, ArgumentType, CommandMessage, CommandReturn, ValidationRule } from "../../core/Command";

export default class RemindCommand extends Command {
public readonly name = "remind";
public readonly validationRules: ValidationRule[] = [];
public readonly permissions = [];

async execute(message: CommandMessage, context: AnyCommandContext): Promise<CommandReturn> {

}
}
10 changes: 8 additions & 2 deletions src/commands/settings/BlockedTokenCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,14 @@ export default class BlockedTokenCommand extends Command {
public readonly permissionMode = "or";

public readonly description = "Manage blocked tokens.";
public readonly detailedDescription =
"Add/remove/check/view the blocked tokens. All arguments, separated by spaces will also be treated as a single token.";
public readonly detailedDescription = [
"Add/remove/check/view the blocked tokens. All arguments, separated by spaces will also be treated as a single token.\n",
"**Subcommands**\n",
"* `add <token>` - Add a blocked token",
"* `remove <token>` - Remove a blocked token",
"* `has <token>` - Check if the given token is blocked",
"* `list` - List all the blocked tokens"
].join("\n");

public readonly slashCommandBuilder = new SlashCommandBuilder()
.addSubcommand(subcommand =>
Expand Down
12 changes: 10 additions & 2 deletions src/commands/settings/BlockedWordCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,16 @@ export default class BlockedWordCommand extends Command {
public readonly permissionMode = "or";

public readonly description = "Manage blocked words.";
public readonly detailedDescription =
"Add/remove/check/view the blocked words. All arguments, separated by spaces will be treated as different words.";

public readonly detailedDescription = [
"Add/remove/check/view the blocked words. All arguments, separated by spaces will be treated as different words.\n",
"**Subcommands**\n",
"* `add <word>` - Add blocked word(s)",
"* `remove <word>` - Remove blocked word(s)",
"* `has <word>` - Check if the given word is blocked",
"* `list` - List all the blocked words"
].join("\n");

public readonly slashCommandBuilder = new SlashCommandBuilder()
.addSubcommand(subcommand =>
subcommand
Expand Down

0 comments on commit 66d88ec

Please sign in to comment.