This commit is contained in:
insert 2024-08-09 15:15:58 -04:00
parent 951771db0f
commit 0621f19894
Signed by: insert
GPG key ID: A70775C389ACF105

View file

@ -21,7 +21,7 @@ class RoleView(nextcord.ui.View):
self.add_item(button)
async def buttoncallback(self, interaction: nextcord.Interaction) -> None:
role = int(interaction.data[custom_id].split(":")[1])
role = int(interaction.data["custom_id"].split(":")[1])
if role in interaction.user.roles:
await interaction.user.remove_roles(role, reason=f"{interaction.user.display_name} used role button")
await interaction.response.send_message(f"Removed <@{role}> from you!", ephemeral=True, allowed_mentions=nextcord.AllowedMentions.none)