K
Kord5mo ago
kxmpxtxnt

Clearing Buttons/Actionrows

Howdy How can i clear actionsrows/buttons of a message? I had two ideas: 1)
it.edit {
components?.clear()
}
it.edit {
components?.clear()
}
2)
it.edit {
actionRow { }
}
it.edit {
actionRow { }
}
The first one does not send an update to discord. The second only adds actionRows to the components set
11 Replies
gdude
gdude5mo ago
components = emptyList()
kxmpxtxnt
kxmpxtxntOP5mo ago
so i tried like this but it doesnt have any impact on the messages
No description
gdude
gdude5mo ago
are you sure the code is being run? do you have the messages intent?
kxmpxtxnt
kxmpxtxntOP5mo ago
pretty sure because i can create messages and add actionrows to them
gdude
gdude5mo ago
channel.messages iterates all the messages in the channel though, you can't just get messages from the API without the intent
kxmpxtxnt
kxmpxtxntOP5mo ago
this is my configuration
No description
gdude
gdude5mo ago
ah, you're using KordEx
kxmpxtxnt
kxmpxtxntOP5mo ago
Oh yes, sorry should have mentioned it
gdude
gdude5mo ago
I mean yeah just setting the components to an empty list should work that's why I'm wondering if your code is actually being run maybe stick a breakpoint in it oh wait you're using onEach that's a flow onEach on its own won't do anything, you still need to consume the flow
kxmpxtxnt
kxmpxtxntOP5mo ago
oh wow im dumb tysm :D
gdude
gdude5mo ago
yw
Want results from more Discord servers?
Add your server