how to remove tag from thread?

^
13 Replies
Unknown User
Unknown User16mo ago
Message Not Public
Sign In & Join Server To View
Baconburger998
Baconburger99816mo ago
ok so just @corysalad do that agian if it has the tag it will be removed?
Pulse
Pulse16mo ago
probably something like this
const newTags = thread.appliedTags.filter(tag => tag !== 'tag to remove`);
await thread.setAppliedTags(newTags)
const newTags = thread.appliedTags.filter(tag => tag !== 'tag to remove`);
await thread.setAppliedTags(newTags)
Baconburger998
Baconburger99816mo ago
ok, what if it doesnt have teh tag, will it then add it?
Pulse
Pulse16mo ago
if it doesnt have the tag then that code wouldn't change the tags
Baconburger998
Baconburger99816mo ago
Ok so it will only remove the tag if the thread has it right?\
Pulse
Pulse16mo ago
right
Baconburger998
Baconburger99816mo ago
Ok, thank you, and tag id not name irhgt? right*
Pulse
Pulse16mo ago
yeah it would be the snowflake
Baconburger998
Baconburger99816mo ago
ok thank didnt work jsremovetag.setAppliedTags is not a function
Pulse
Pulse16mo ago
i linked the documentation, maybe you're not calling it on the right type of thread or something
Baconburger998
Baconburger99816mo ago
Ok