fix(repo): ruff fixes / removing pylint exceptions
This commit is contained in:
parent
e34d621e6d
commit
858a1bae8a
12 changed files with 51 additions and 56 deletions
|
@ -1,9 +1,11 @@
|
|||
from discord import ButtonStyle, ui, Interaction
|
||||
from discord import ButtonStyle, Interaction, ui
|
||||
from redbot.core import commands
|
||||
from redbot.core.utils.chat_formatting import error
|
||||
|
||||
from aurora.utilities.factory import addrole_embed
|
||||
from aurora.utilities.config import config
|
||||
from aurora.utilities.factory import addrole_embed
|
||||
|
||||
|
||||
|
||||
class Addrole(ui.View):
|
||||
def __init__(self, ctx: commands.Context):
|
||||
|
@ -25,7 +27,7 @@ class Addrole(ui.View):
|
|||
await interaction.message.edit(embed=await addrole_embed(self.ctx))
|
||||
|
||||
@ui.button(label="Clear", style=ButtonStyle.red, row=1)
|
||||
async def clear(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument
|
||||
async def clear(self, interaction: Interaction, button: ui.Button):
|
||||
if not interaction.user.guild_permissions.manage_guild and not interaction.user.guild_permissions.administrator:
|
||||
await interaction.response.send_message(error("You must have the manage guild permission to clear the guild's addrole whitelist."), ephemeral=True)
|
||||
return
|
||||
|
@ -34,7 +36,7 @@ class Addrole(ui.View):
|
|||
await interaction.message.edit(embed=await addrole_embed(self.ctx))
|
||||
|
||||
@ui.button(label="Close", style=ButtonStyle.gray)
|
||||
async def close(self, interaction: Interaction, button: ui.Button): # pylint: disable=unused-argument
|
||||
async def close(self, interaction: Interaction, button: ui.Button):
|
||||
if not interaction.user.guild_permissions.manage_guild and not interaction.user.guild_permissions.administrator:
|
||||
await interaction.response.send_message(error("You can't do that!"), ephemeral=True)
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue