TextChannel.permissionsOverwrite.set working once only

So I have a command that sets the permission overwrite to a different role, but it only works once for the channel. Is this intended?
4 Replies
Hax
HaxOP3y ago
It does not set the same thing, it sets to a different role depending on the role given But it's not working after the first time the command is ran
await interaction.channel.permissionOverwrites.set([
{
"id": member.guild.id,
deny: ["VIEW_CHANNEL"]
},
{
"id": ticketcreator,
allow: ["VIEW_CHANNEL", "READ_MESSAGE_HISTORY", "SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"]
},
{
"id": interaction.values[0],
allow: ["VIEW_CHANNEL", "READ_MESSAGE_HISTORY", "SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"]
}
])
await interaction.channel.permissionOverwrites.set([
{
"id": member.guild.id,
deny: ["VIEW_CHANNEL"]
},
{
"id": ticketcreator,
allow: ["VIEW_CHANNEL", "READ_MESSAGE_HISTORY", "SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"]
},
{
"id": interaction.values[0],
allow: ["VIEW_CHANNEL", "READ_MESSAGE_HISTORY", "SEND_MESSAGES", "EMBED_LINKS", "ATTACH_FILES"]
}
])
this is a select menu btw i did console.log interaction.values[0] is different It has administrator The second time would overwrite the ones you did the first time, is that intended? Yes. But it's not overwriting at all Apparently, I can't edit the channel topic anymore too There's literally no if condition, it's wrapped inside a timeout
Hax
HaxOP3y ago
Hax
HaxOP3y ago
Timeout 100% runs Since the log runs Yeah think it's rate limited hmm How to know if I'm getting rate limited? Would it throw an error?
d.js docs
d.js docs3y ago
event (event) Client#rateLimit Emitted when the client hits a rate limit while making a request
Want results from more Discord servers?
Add your server