Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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.
- no detailed description yet
- **Options:** None
- **Subcommands:** None

## ping
- **Aliases:** `pong`
- **Description:** Ping the bot to see if it is alive. :ping_pong:
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,5 +63,6 @@
"nodemon": "^2.0.22",
"prettier": "^2.8.7",
"tsc-watch": "^4.6.2"
}
},
"packageManager": "[email protected]+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this line, revert the package.json file to what it was before.

}
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 { 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`,
},
]);
// look at info.ts about coin to see embded details
return { embeds: [officeEmbed] };
};

export const officeCommandDetails: CodeyCommandDetails = {
name: 'office',
aliases: [],
description: 'Get information about the CSC office.',
detailedDescription: `no detailed description yet`,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Preferably, we fill in detailedDescription so that our commandWiki is complete. See attached example from member.ts.
Screenshot 2024-11-22 at 8 19 56 PM


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,
});
}
}
Loading