Skip to content

Commit

Permalink
Modified .member to have uwid optional, and added membership explanat…
Browse files Browse the repository at this point in the history
…ion when no uwid is passed
  • Loading branch information
Di Nguyen committed Jan 18, 2024
1 parent c05c019 commit e708d3e
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/commandDetails/miscellaneous/member.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,20 @@ type UwIdType = string | undefined;
*/
const getMemberEmbed = async (uwid: UwIdType): Promise<EmbedBuilder> => {
const title = 'CSC Membership Information';
const EXPLAIN_MEMBERSHIP = `Oops! You didn't provide a UW ID.
If you're already a CSC member, please provide a UW ID.
If not, perhaps you're interested in becoming one?
Being a CSC member comes with gaining access to CSC machines, cloud, email, web hosting, and more! Additional details can be found here! https://csclub.uwaterloo.ca/resources/services/
To sign up, you can follow the instructions here! https://csclub.uwaterloo.ca/get-involved/`;
if (!uwid) {
return new EmbedBuilder()

Check failure on line 37 in src/commandDetails/miscellaneous/member.ts

View workflow job for this annotation

GitHub Actions / build (16.x)

Replace `⏎······.setColor('Red')⏎······.setTitle(title)⏎······` with `.setColor('Red').setTitle(title)`
.setColor('Red')
.setTitle(title)
.setDescription('Please provide a UW ID!');
.setDescription(EXPLAIN_MEMBERSHIP);
}

const members = (await (await fetch(MEMBER_API)).json()).members as memberStatus[];
Expand Down Expand Up @@ -82,7 +91,7 @@ export const memberCommandDetails: CodeyCommandDetails = {
name: 'uwid',
description: 'The Quest ID of the user.',
type: CodeyCommandOptionType.STRING,
required: true,
required: false,
},
],
subcommandDetails: {},
Expand Down

0 comments on commit e708d3e

Please sign in to comment.