-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: {}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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, | ||
}); | ||
} | ||
} |