generated from nhcarrigan/template
This commit is contained in:
@@ -16,6 +16,7 @@ import type { Message } from "discord.js";
|
||||
* @param _amari -- Amari's instance.
|
||||
* @param message -- The guild message payload from Discord.
|
||||
*/
|
||||
// eslint-disable-next-line complexity -- Fuck off.
|
||||
export const updateMentorshipThread = async(
|
||||
_amari: Amari,
|
||||
message: Message<true>,
|
||||
@@ -39,11 +40,17 @@ export const updateMentorshipThread = async(
|
||||
? ids.tags.goal.naomi
|
||||
: ids.tags.project.naomi;
|
||||
if (author.id === ids.users.naomi) {
|
||||
if (channel.appliedTags.includes(memberTag)) {
|
||||
return;
|
||||
}
|
||||
await channel.setAppliedTags([ ...channel.appliedTags.filter((tag) => {
|
||||
return tag !== naomiTag;
|
||||
}), memberTag ]);
|
||||
return;
|
||||
}
|
||||
if (channel.appliedTags.includes(naomiTag)) {
|
||||
return;
|
||||
}
|
||||
await channel.setAppliedTags([ ...channel.appliedTags.filter((tag) => {
|
||||
return tag !== memberTag;
|
||||
}), naomiTag ]);
|
||||
|
||||
Reference in New Issue
Block a user