This commit is contained in:
insert 2024-08-09 15:21:23 -04:00
parent 2f81cfdf64
commit b4a2758d22
Signed by: insert
GPG key ID: A70775C389ACF105

View file

@ -24,10 +24,10 @@ class RoleView(nextcord.ui.View):
role = interaction.guild.get_role(int(interaction.data["custom_id"].split(":")[1])) role = interaction.guild.get_role(int(interaction.data["custom_id"].split(":")[1]))
if role in interaction.user.roles: if role in interaction.user.roles:
await interaction.user.remove_roles(role, reason=f"{interaction.user.display_name} used role button") 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) await interaction.response.send_message(f"Removed <@{role}> from you!", ephemeral=True, allowed_mentions=nextcord.AllowedMentions.none())
else: else:
await interaction.user.add_roles(role, reason=f"{interaction.user.display_name} used role button") await interaction.user.add_roles(role, reason=f"{interaction.user.display_name} used role button")
await interaction.response.send_message(f"Added <@{role}> to you!", ephemeral=True, allowed_mentions=nextcord.AllowedMentions.none) await interaction.response.send_message(f"Added <@{role}> to you!", ephemeral=True, allowed_mentions=nextcord.AllowedMentions.none())
return return