Skip to content

Commit a3c1586

Browse files
committed
feat: clickable link
1 parent d3e4ab8 commit a3c1586

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

src/commands/canvas/assignments.ts

+11-4
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,22 @@ export async function execute(interaction: ChatInputCommandInteraction) {
7979
if (upcomingAssignments.length > 0) {
8080
const embed = new EmbedBuilder()
8181
.setColor(randomColor())
82-
.setTitle("Upcoming Assignments")
82+
.setTitle("📚 Upcoming Assignments")
8383
.setDescription(
8484
"Here are the upcoming assignments for the selected course:",
8585
)
8686
.addFields(
8787
upcomingAssignments.map(
88-
(assignment: { name: string; due_at: string }) => ({
89-
name: assignment.name,
90-
value: `Due: ${new Date(assignment.due_at).toLocaleString()}`,
88+
(assignment: {
89+
name: string;
90+
due_at: string;
91+
html_url: string;
92+
}) => ({
93+
name: `${assignment.name}`,
94+
value: `Due: ${new Date(assignment.due_at).toLocaleString()} \n[${
95+
assignment.name
96+
}](${assignment.html_url})`,
97+
inline: false,
9198
}),
9299
),
93100
)

0 commit comments

Comments
 (0)