Skip to content

Fix embed option usage of strings with objects #207

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 12, 2024
Merged
Changes from all 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
9 changes: 7 additions & 2 deletions commands/handbook.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
const response = await axios.get(`${apiURL}/courses/getCourse/${courseCode}`);
data = response.data;
// console.log(data);
} catch (e) {

Check warning on line 35 in commands/handbook.js

View workflow job for this annotation

GitHub Actions / Format & lint check

'e' is defined but never used
return await interaction.reply({
content: "Invalid course code.",
ephemeral: true,
Expand All @@ -59,7 +59,10 @@
.setTitle(title)
.setURL(`${handbookURL}/${code}`)
.setColor(0x3a76f8)
.setAuthor(`Course Info: ${code} (${UOC} UOC)`, "https://i.imgur.com/EE3Q40V.png")
.setAuthor({
name: `Course Info: ${code} (${UOC} UOC)`,
iconURL: "https://i.imgur.com/EE3Q40V.png",
})
.addFields(
{
name: "Overview",
Expand Down Expand Up @@ -106,7 +109,9 @@
/* }, */
)
.setTimestamp()
.setFooter("Data fetched from Circles' Api");
.setFooter({
text: "Data fetched from Circles' Api",
});
await interaction.reply({ embeds: [courseInfo] });
}
},
Expand Down
Loading