Skip to content

Commit eb05485

Browse files
committed
fix(ci): Resolve CI errors
1 parent b7e9d67 commit eb05485

2 files changed

Lines changed: 9 additions & 6 deletions

File tree

src/commands/DevForumReactionRole.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import Command from "@/handlers/commands/Command";
22
import content from "@data/DevForumRoleMessageStrings.json";
3+
4+
import type { ChatInputCommandInteraction } from "discord.js";
35
import {
46
ActionRowBuilder,
57
AttachmentBuilder,
68
ButtonBuilder,
79
ButtonStyle,
8-
ChatInputCommandInteraction,
910
ContainerBuilder,
1011
inlineCode,
1112
MessageFlagsBitField,

src/components/VerifyDevForumRank.ts

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import Logger from "@/utils/logger";
22
import Component from "@handlers/components/Component";
33

4-
import { ButtonInteraction, MessageFlagsBitField, Snowflake } from "discord.js";
4+
import type { ButtonInteraction, Snowflake } from "discord.js";
5+
import { MessageFlagsBitField } from "discord.js";
56

67
// noinspection JSUnusedGlobalSymbols
78
export default class VerifyDevForumRank extends Component {
@@ -62,12 +63,12 @@ export default class VerifyDevForumRank extends Component {
6263

6364
// Validate the response format
6465
if (!data || typeof data !== "object" || !("user" in data) || typeof data.user !== "object") {
65-
Logger.error("Unknown response format from DevForum API. Expected object: data.user, received: " + JSON.stringify(data));
66+
Logger.error(`Unknown response format from DevForum API. Expected object: data.user, received: ${JSON.stringify(data)}`);
6667
return null;
6768
}
6869

6970
if (!data.user || !("trust_level" in data.user) || typeof data.user.trust_level !== "number") {
70-
Logger.error("Unknown response format from DevForum API. Expected number: data.user.trust_level, received: " + JSON.stringify(data));
71+
Logger.error(`Unknown response format from DevForum API. Expected number: data.user.trust_level, received: ${JSON.stringify(data)}`);
7172
return null;
7273
}
7374

@@ -78,7 +79,8 @@ export default class VerifyDevForumRank extends Component {
7879
const endpoint = this.formatApiEndpoint(discordId, guildId);
7980
const response = await fetch(endpoint, {
8081
headers: {
81-
"Authorization": `Bearer ${process.env.ROVER_API_KEY}`,
82+
// eslint-disable-next-line @typescript-eslint/naming-convention
83+
Authorization: `Bearer ${process.env.ROVER_API_KEY}`
8284
}
8385
});
8486

@@ -91,7 +93,7 @@ export default class VerifyDevForumRank extends Component {
9193

9294
// Validate the response format
9395
if (!data || typeof data !== "object" || !("cachedUsername" in data) || typeof data.cachedUsername !== "string") {
94-
Logger.error("Unknown response format from Rover API. Expected string: data.cachedUsername, received: " + JSON.stringify(data));
96+
Logger.error(`Unknown response format from Rover API. Expected string: data.cachedUsername, received: ${JSON.stringify(data)}`);
9597
return null;
9698
}
9799

0 commit comments

Comments
 (0)