how to remove tag from thread?

^
13 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
JollyJohn
JollyJohnOP2y ago
ok so just @corysalad do that agian if it has the tag it will be removed?
Pulse
Pulse2y 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)
JollyJohn
JollyJohnOP2y ago
ok, what if it doesnt have teh tag, will it then add it?
Pulse
Pulse2y ago
if it doesnt have the tag then that code wouldn't change the tags
JollyJohn
JollyJohnOP2y ago
Ok so it will only remove the tag if the thread has it right?\
Pulse
Pulse2y ago
right
JollyJohn
JollyJohnOP2y ago
Ok, thank you, and tag id not name irhgt? right*
Pulse
Pulse2y ago
yeah it would be the snowflake
JollyJohn
JollyJohnOP2y ago
ok thank didnt work jsremovetag.setAppliedTags is not a function
Pulse
Pulse2y ago
i linked the documentation, maybe you're not calling it on the right type of thread or something
JollyJohn
JollyJohnOP2y ago
Ok
Want results from more Discord servers?
Add your server