generated from nhcarrigan/template
Compare commits
2 Commits
feat/add-d
...
main
Author | SHA1 | Date | |
---|---|---|---|
c0b21ce82f
|
|||
8121f3bb6d
|
14
src/index.ts
14
src/index.ts
@ -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()) {
|
||||
return;
|
||||
}
|
||||
@ -54,8 +55,19 @@ client.on(Events.MessageCreate, (message) => {
|
||||
if (message.author.bot) {
|
||||
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)) {
|
||||
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.`,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
Reference in New Issue
Block a user