Skip to content

Commit d0656ca

Browse files
zcDay1AcdSoftCo
andauthored
Projects description command feature (#145)
* projects-descriptions v1 commit * project-descriptions command v2 commit * linting fixes for project-descriptions.js, and for handbook.js --------- Co-authored-by: AcdSoftCo <106219586+AcdSoftCo@users.noreply.github.com>
1 parent 883a0d8 commit d0656ca

File tree

2 files changed

+90
-5
lines changed

2 files changed

+90
-5
lines changed

commands/handbook.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ module.exports = {
4343
title,
4444
code,
4545
UOC,
46-
level,
46+
// level,
4747
description,
48-
study_level,
49-
school,
50-
campus,
48+
// study_level,
49+
// school,
50+
// campus,
5151
equivalents,
5252
raw_requirements,
5353
exclusions,
54-
handbook_note,
54+
// handbook_note,
5555
terms,
5656
} = data;
5757

commands/project-descriptions.js

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
const { SlashCommandBuilder } = require("@discordjs/builders");
2+
3+
module.exports = {
4+
data: new SlashCommandBuilder()
5+
.setName("project-descriptions")
6+
.setDescription("Returns a description for each project under CSESoc Development!")
7+
.addStringOption((option) =>
8+
option
9+
.setName("project")
10+
.setDescription("Which project do you want to be introduced to?")
11+
.setRequired(true)
12+
.addChoices([
13+
["Chaos", "chaos"],
14+
["Circles", "circles"],
15+
["CS Electives", "cselectives"],
16+
["Discord Bot", "discordbot"],
17+
["Freerooms", "freerooms"],
18+
["Jobsboard", "jobsboard"],
19+
["Notangles", "notangles"],
20+
["Structs.sh", "structs.sh"],
21+
["UI/UX", "ui/ux"],
22+
["Website", "website"],
23+
]),
24+
),
25+
26+
async execute(interaction) {
27+
const parsedOption = interaction.options.get("project").value.toLowerCase();
28+
// console.log(`.${parsedOption}.`);
29+
switch (parsedOption) {
30+
case "chaos":
31+
await interaction.reply(
32+
"Chaos is a CSESoc internal recruitment tool written in Rust.",
33+
);
34+
break;
35+
case "circles":
36+
await interaction.reply(
37+
"Circles is a degree planner that helps you choose courses, plan out your terms and check progression.",
38+
);
39+
break;
40+
case "cselectives":
41+
await interaction.reply(
42+
"Unsure about what a course is like? Worry no more; CSElectives lets you read and write reviews of UNSW CSE courses.",
43+
);
44+
break;
45+
case "discordbot":
46+
await interaction.reply(
47+
"CSESoc Discord Bot is your friendly helper in all things fun and CSE.",
48+
);
49+
break;
50+
case "freerooms":
51+
await interaction.reply(
52+
"Looking for a room to study in? Freerooms lets you see which on-campus rooms are vacant and which ones are booked.",
53+
);
54+
break;
55+
case "jobsboard":
56+
await interaction.reply(
57+
"Jobsboard is an app that connects CSE students with companies looking for recruits.",
58+
);
59+
break;
60+
case "notangles":
61+
await interaction.reply(
62+
"Notangles is a timetable planning app for UNSW students to build their perfect timetable, even before class registration opens.",
63+
);
64+
break;
65+
case "structs.sh":
66+
await interaction.reply("Structs.sh is an interactive algorithm visualiser.");
67+
break;
68+
case "ui/ux":
69+
await interaction.reply(
70+
"The CSESoc Development UI/UX team works with all things related to user interface and experience design!",
71+
);
72+
break;
73+
case "website":
74+
await interaction.reply(
75+
"The website team are in charge of writing the software for the CSESoc website.",
76+
);
77+
break;
78+
default:
79+
await interaction.reply(
80+
"Error: the switch case has fallen through to the default case.",
81+
);
82+
break;
83+
}
84+
},
85+
};

0 commit comments

Comments
 (0)