Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions docs/COMMAND-WIKI.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,13 @@
- ``uwid``: The Quest ID of the user.
- **Subcommands:** None

## office
- **Aliases:** None
- **Description:** Get information about the CSC office.
- **Examples:** <br> `.office`
- **Options:** None
- **Subcommands:** None

## ping
- **Aliases:** `pong`
- **Description:** Ping the bot to see if it is alive. :ping_pong:
Expand Down
49 changes: 49 additions & 0 deletions src/commandDetails/miscellaneous/office.ts
Original file line number Diff line number Diff line change
@@ -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<SapphireMessageResponse> => {
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: {},
};
16 changes: 16 additions & 0 deletions src/commands/miscellaneous/office.ts
Original file line number Diff line number Diff line change
@@ -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,
});
}
}