Add different commands per server #66

Closed
opened 2021-11-28 13:36:25 +00:00 by Vylpes · 0 comments
Vylpes commented 2021-11-28 13:36:25 +00:00 (Migrated from github.com)

Description

There should be a way to add custom commands that are only available for a specific server, or overwrite an existing base command.

Acceptance Criteria

AS a bot owner
GIVEN there is no command with the same name
WHEN I add a command into a subdirectory with the name of the server id
THEN this command should only be discoverable by that server

AS a bot owner
GIVEN there is a command with the same name
WHEN I add a command into a subdirectory with the name of the server id
THEN this command should be used instead of the base command

AS a user
GIVEN there is a server exclusive command
WHEN I run the help command
THEN this command should show in its own section

AS a moderator
GIVEN I disable a server exclusive command
WHEN I run the command
THEN it should be disabled also

Notes

  • Commands folder will contain all commands for every server, eg. commands/about.ts
  • Commands may contain a folder with the server's id for commands to override the main, eg. commands/abc/about.ts
  • Overwritten commands without a main command will be exclusive to that server
  • Overwritten commands with a main command will use that rather than the main command

Subtasks

  • #116
  • Add option in register
  • Add server exclusive commands
  • Add server overwritten commands
  • Add needed exclusive commands
  • #120
  • Update documentation
## Description There should be a way to add custom commands that are only available for a specific server, or overwrite an existing base command. ## Acceptance Criteria AS a bot owner GIVEN there is no command with the same name WHEN I add a command into a subdirectory with the name of the server id THEN this command should only be discoverable by that server AS a bot owner GIVEN there is a command with the same name WHEN I add a command into a subdirectory with the name of the server id THEN this command should be used instead of the base command AS a user GIVEN there is a server exclusive command WHEN I run the help command THEN this command should show in its own section AS a moderator GIVEN I disable a server exclusive command WHEN I run the command THEN it should be disabled also ## Notes - Commands folder will contain all commands for every server, eg. `commands/about.ts` - Commands may contain a folder with the server's id for commands to override the main, eg. `commands/abc/about.ts` - Overwritten commands without a main command will be exclusive to that server - Overwritten commands **with** a main command will use that rather than the main command ## Subtasks - [x] #116 - [x] Add option in register - [x] Add server exclusive commands - [x] Add server overwritten commands - [x] Add needed exclusive commands - [x] #120 - [x] Update documentation
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: RabbitLabs/vylbot-app#66
No description provided.