Compare commits

2 Commits

Author SHA1 Message Date
c0b21ce82f feat: confirm participation
Some checks failed
Code Analysis / SonarQube (push) Failing after 14s
Node.js CI / Lint and Test (push) Successful in 34s
2025-07-02 14:48:50 -07:00
8121f3bb6d feat: only assign participation in Maribelle's threads
Some checks failed
Code Analysis / SonarQube (push) Failing after 16s
Node.js CI / Lint and Test (push) Successful in 35s
2025-07-02 14:29:18 -07:00

View File

@ -38,7 +38,8 @@ client.on(Events.ClientReady, () => {
}); });
}); });
client.on(Events.MessageCreate, (message) => { // eslint-disable-next-line @typescript-eslint/no-misused-promises -- sod off this is going away next month.
client.on(Events.MessageCreate, async(message) => {
if (!message.channel.isThread() || !message.inGuild()) { if (!message.channel.isThread() || !message.inGuild()) {
return; return;
} }
@ -54,8 +55,19 @@ client.on(Events.MessageCreate, (message) => {
if (message.author.bot) { if (message.author.bot) {
return; return;
} }
const threadOwner = await message.channel.fetchOwner();
// Check if thread owner is Maribelle (to indicate it is progress thread)
if (threadOwner?.id !== "1386862413936328796") {
return;
}
if (!activeIds.includes(message.author.id)) { if (!activeIds.includes(message.author.id)) {
activeIds.push(message.author.id); activeIds.push(message.author.id);
await message.channel.send({
allowedMentions: {
parse: [],
},
content: `-# Thank you for your progress update, <@${message.author.id}>! Your participation for today has been recorded.`,
});
} }
}); });