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