Edit forum thread's tags with command #1214
-
How the heck do you edit an existing forum thread's tags via DiscordPHP? Has to be somewhere in https://discord-php.github.io/DiscordPHP/classes/Discord-Parts-Thread-Thread, but all the ones I try don't seem to work. ($tagID is the tag's ID as a string, ex: 1231231231231231231) I have tried: And nothing changes. It's possible that I may need to create my own JSON command - if so, I would need to research how discord.py does it, and modify the JSON command we use for $thread->rename() |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You are overcomplicating (please refrain from using the Part Simply do |
Beta Was this translation helpful? Give feedback.
You are overcomplicating (please refrain from using the Part
__set()
oroffsetSet()
methods), to modify Part attributes, just set the property and use the corresponding repository'ssave()
method as the basic explained https://github.com/discord-php/DiscordPHP/wiki#partsSimply do
$thread->applied_tags = [1231231231231231231]
And then use the repository save method
$threads->save($thread)->done()
where$threads = $channel->threads