feat: support discussion forum
Node.js CI / Lint and Test (push) Successful in 43s

This commit is contained in:
2025-08-21 12:17:28 -07:00
parent 1346a29a1f
commit 1d4f0af6f8
3 changed files with 12 additions and 1 deletions
+5
View File
@@ -8,6 +8,7 @@ export const ids = {
channels: {
mentorshipGoalForum: "1400629118110011526",
mentorshipProjectForum: "1400616702265266186",
naomiDiscussionForum: "1408154690121633917",
news: "1407804798677418198",
resumeReviewForum: "1407807555266154496",
},
@@ -19,6 +20,10 @@ export const ids = {
representing: "1407861842847469598",
},
tags: {
discussion: {
member: "1408167311516500071",
naomi: "1408167262803853493",
},
goal: {
member: "1406355263811752147",
naomi: "1406355221847871740",
-1
View File
@@ -38,7 +38,6 @@ amari.discord.once(Events.ClientReady, () => {
`Authenticated to Discord as ${amari.discord.user?.username ?? "unknown"}`);
void cacheData(amari);
scheduleJob("post news", "0 * * * *", async() => {
await logger.log("debug", "Fetching tech news.");
await postFreeCodeCampNews(amari);
await postHackerNews(amari);
});
+7
View File
@@ -25,6 +25,11 @@ const getTag = (id: string, type: "naomi" | "member"): string => {
? ids.tags.resume.naomi
: ids.tags.resume.member;
}
if (id === ids.channels.naomiDiscussionForum) {
return type === "naomi"
? ids.tags.discussion.naomi
: ids.tags.discussion.member;
}
return "";
};
@@ -48,11 +53,13 @@ export const updateMentorshipThread = async(
mentorshipGoalForum,
mentorshipProjectForum,
resumeReviewForum,
naomiDiscussionForum,
} = ids.channels;
if (![
mentorshipGoalForum,
mentorshipProjectForum,
resumeReviewForum,
naomiDiscussionForum,
].includes(channel.parent.id)) {
return;
}