From 0621f1989468df8e3c92cab668320606ab34dd09 Mon Sep 17 00:00:00 2001 From: insert Date: Fri, 9 Aug 2024 15:15:58 -0400 Subject: [PATCH] update --- rolebuttons.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rolebuttons.py b/rolebuttons.py index f2f80d7..6a8578b 100644 --- a/rolebuttons.py +++ b/rolebuttons.py @@ -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)