Skip to content

Commit 32e8541

Browse files
Explain the membership process when no UW ID is passed in .member (#504)
* Modified .member to have uwid optional, and added membership explanation when no uwid is passed * Changed no UW ID embed to blue, updated no UW ID description and reorganized the descriptions --------- Co-authored-by: Di Nguyen <[email protected]>
1 parent c05c019 commit 32e8541

File tree

1 file changed

+19
-11
lines changed

1 file changed

+19
-11
lines changed

src/commandDetails/miscellaneous/member.ts

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,24 @@ type UwIdType = string | undefined;
2424
*/
2525
const getMemberEmbed = async (uwid: UwIdType): Promise<EmbedBuilder> => {
2626
const title = 'CSC Membership Information';
27+
const EXPLAIN_MEMBERSHIP = `Oops! You didn't provide a UW ID.
28+
29+
Please provide a UW ID to check if you are a CSC member.
30+
31+
If you are not, are you interested in being one?
32+
33+
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/
34+
35+
To sign up, you can follow the instructions here! https://csclub.uwaterloo.ca/get-involved/`;
36+
const IS_MEMBER_DESCRIPTION = `You're a CSC member! Hooray! ${getEmojiByName('codey_love')}`;
37+
const NOT_MEMBER_DESCRIPTION = `You're not a CSC member! ${getEmojiByName('codey_sad')}
38+
39+
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/
40+
41+
To sign up, you can follow the instructions here! https://csclub.uwaterloo.ca/get-involved/`;
42+
2743
if (!uwid) {
28-
return new EmbedBuilder()
29-
.setColor('Red')
30-
.setTitle(title)
31-
.setDescription('Please provide a UW ID!');
44+
return new EmbedBuilder().setColor('Blue').setTitle(title).setDescription(EXPLAIN_MEMBERSHIP);
3245
}
3346

3447
const members = (await (await fetch(MEMBER_API)).json()).members as memberStatus[];
@@ -38,14 +51,9 @@ const getMemberEmbed = async (uwid: UwIdType): Promise<EmbedBuilder> => {
3851
return new EmbedBuilder()
3952
.setColor('Green')
4053
.setTitle(title)
41-
.setDescription(`You're a CSC member! Hooray! ${getEmojiByName('codey_love')}`);
54+
.setDescription(IS_MEMBER_DESCRIPTION);
4255
}
4356

44-
const NOT_MEMBER_DESCRIPTION = `You're not a CSC member! ${getEmojiByName('codey_sad')}
45-
46-
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/
47-
48-
To sign up, you can follow the instructions here! https://csclub.uwaterloo.ca/get-involved/`;
4957
return new EmbedBuilder().setColor('Red').setTitle(title).setDescription(NOT_MEMBER_DESCRIPTION);
5058
};
5159

@@ -82,7 +90,7 @@ export const memberCommandDetails: CodeyCommandDetails = {
8290
name: 'uwid',
8391
description: 'The Quest ID of the user.',
8492
type: CodeyCommandOptionType.STRING,
85-
required: true,
93+
required: false,
8694
},
8795
],
8896
subcommandDetails: {},

0 commit comments

Comments
 (0)