diff --git a/docs/COMMAND-WIKI.md b/docs/COMMAND-WIKI.md index c2cc7eca..90690aa7 100644 --- a/docs/COMMAND-WIKI.md +++ b/docs/COMMAND-WIKI.md @@ -258,6 +258,13 @@ - ``uwid``: The Quest ID of the user. - **Subcommands:** None +## office +- **Aliases:** None +- **Description:** Get information about the CSC office. +- **Examples:**
`.office` +- **Options:** None +- **Subcommands:** None + ## ping - **Aliases:** `pong` - **Description:** Ping the bot to see if it is alive. :ping_pong: diff --git a/src/commandDetails/miscellaneous/office.ts b/src/commandDetails/miscellaneous/office.ts new file mode 100644 index 00000000..9edf82b6 --- /dev/null +++ b/src/commandDetails/miscellaneous/office.ts @@ -0,0 +1,49 @@ +import { container } from '@sapphire/framework'; +import { EmbedBuilder } from 'discord.js'; +import { + CodeyCommandDetails, + SapphireMessageExecuteType, + SapphireMessageResponse, +} from '../../codeyCommand'; +import { DEFAULT_EMBED_COLOUR } from '../../utils/embeds'; + +const officeExecuteCommand: SapphireMessageExecuteType = async ( + _client, + _messageFromUser, + _args, +): Promise => { + const officeEmbed = new EmbedBuilder() + .setColor(DEFAULT_EMBED_COLOUR) + .setTitle(`About the CSC Office`) + .setThumbnail('https://cdn.discordapp.com/emojis/869377257586704407.png') + .setDescription(`Find us in MC 3036/3037!`) + .addFields([ + { + name: `What we offer:`, + value: ` + • Pop for just 50 cents + • Informative books + • 5 computer terminals + • (sometimes) super knowledgeable people `, + }, + { + name: `Call us!`, + value: `(519) 888-4567 x33870`, + }, + ]); + return { embeds: [officeEmbed] }; +}; + +export const officeCommandDetails: CodeyCommandDetails = { + name: 'office', + aliases: [], + description: 'Get information about the CSC office.', + detailedDescription: `**Examples:** + \`${container.botPrefix}office\``, + isCommandResponseEphemeral: false, + messageWhenExecutingCommand: 'Retrieving information about the office...', + executeCommand: officeExecuteCommand, + messageIfFailure: 'Could not retrieve information about office.', + options: [], + subcommandDetails: {}, +}; diff --git a/src/commands/miscellaneous/office.ts b/src/commands/miscellaneous/office.ts new file mode 100644 index 00000000..f8c38e29 --- /dev/null +++ b/src/commands/miscellaneous/office.ts @@ -0,0 +1,16 @@ +import { Command } from '@sapphire/framework'; +import { CodeyCommand } from '../../codeyCommand'; +import { officeCommandDetails } from '../../commandDetails/miscellaneous/office'; + +export class MiscellaneousOfficeCommand extends CodeyCommand { + details = officeCommandDetails; + + public constructor(context: Command.Context, options: Command.Options) { + super(context, { + ...options, + aliases: officeCommandDetails.aliases, + description: officeCommandDetails.description, + detailedDescription: officeCommandDetails.detailedDescription, + }); + } +}