how to get forum tags id?

and then add the tags in specific forum
11 Replies
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
duck
duck3y ago
<ForumChannel>.availableTags is an array of GuildForumTags <GuildForumTag>.id
Hexaa
HexaaOP3y ago
so i must running that <ForumChannel>.availableTags and then get the id?
duck
duck3y ago
what it's an array access whatever tag(s) you want (or map all of them if you really want) then access the id property of the object(s)
Hexaa
HexaaOP3y ago
i'd like to create commands that the value is console.log(<ForumChannel>.availableTags) to get the tags id?
duck
duck3y ago
I don't know what you mean by "create commands that the value is availableTags"
Hexaa
HexaaOP3y ago
umm maybe like this?
module.exports = {
name: "test",
async execute(interaction, client) {
const channel = await client.channels.cache.get("some forum channel id");

console.log(channel.availableTags)
}
}
module.exports = {
name: "test",
async execute(interaction, client) {
const channel = await client.channels.cache.get("some forum channel id");

console.log(channel.availableTags)
}
}
duck
duck3y ago
the property is availableTags
Hexaa
HexaaOP3y ago
sorry typo
duck
duck3y ago
then sure, that will log the array of tags
Hexaa
HexaaOP3y ago
okay, thanks for helping me:)

Did you find this page helpful?