Skip to content

Commit

Permalink
created new uwflow command
Browse files Browse the repository at this point in the history
  • Loading branch information
probro27 committed Mar 19, 2024
1 parent 277acf2 commit a883ae8
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/COMMAND-WIKI.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,21 @@
- ``description``: The description of the customization to be set for the user.
- **Subcommands:** None

# UWFLOW
## uwflow
- **Aliases:** None
- **Description:** Handle UWFlow commands.
- **Examples:**
- **Options:** None
- **Subcommands:** `info`

## uwflow info
- **Aliases:** `information`, `i`
- **Description:** Get info about courses using UWFlow.
- **Examples:**<br>`.uwflow info`<br>`.uwflow information`<br>`.uwflow i`
- **Options:** None
- **Subcommands:** None

# SUGGESTION
## suggestion
- **Aliases:** ``suggest``
Expand Down
30 changes: 30 additions & 0 deletions src/commandDetails/uwflow/info.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import { container } from '@sapphire/framework';
import {
CodeyCommandDetails,
SapphireMessageExecuteType,
SapphireMessageResponse,
} from '../../codeyCommand';

const uwflowInfoExecuteCommand: SapphireMessageExecuteType = async (
_client,
_messageFromUser,
_args,
): Promise<SapphireMessageResponse> => {
return 'UWFlow is a website where students can view course reviews and ratings.';
};

export const uwflowInfoCommandDetails: CodeyCommandDetails = {
name: 'info',
aliases: ['information', 'i'],
description: 'Get info about courses using UWFlow.',
detailedDescription: `**Examples:**
\`${container.botPrefix}uwflow info\`
\`${container.botPrefix}uwflow information\`
\`${container.botPrefix}uwflow i\``,

isCommandResponseEphemeral: false,
messageWhenExecutingCommand: 'Getting information about UWFlow:',
executeCommand: uwflowInfoExecuteCommand,
options: [],
subcommandDetails: {},
};
28 changes: 28 additions & 0 deletions src/commands/uwflow/uwflow.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import { Command } from '@sapphire/framework';
import { uwflowInfoCommandDetails } from '../../commandDetails/uwflow/info';
import { CodeyCommand, CodeyCommandDetails } from '../../codeyCommand';

const uwflowCommandDetails: CodeyCommandDetails = {
name: 'uwflow',
aliases: [],
description: 'Handle UWFlow commands.',
detailedDescription: `**Examples:**`,
options: [],
subcommandDetails: {
info: uwflowInfoCommandDetails,
},
defaultSubcommandDetails: uwflowInfoCommandDetails,
};

export class UWFlowCommand extends CodeyCommand {
details = uwflowCommandDetails;

public constructor(context: Command.Context, options: Command.Options) {
super(context, {
...options,
aliases: uwflowCommandDetails.aliases,
description: uwflowCommandDetails.description,
detailedDescription: uwflowCommandDetails.detailedDescription,
});
}
}

0 comments on commit a883ae8

Please sign in to comment.