fix(forums): various pylint fixes
This commit is contained in:
parent
e1bdbe41ce
commit
cb15f7e2c1
1 changed files with 3 additions and 4 deletions
|
@ -55,7 +55,7 @@ class Forums(commands.Cog):
|
|||
self.config = Config.get_conf(None, cog_name='Forums', identifier=2352711325)
|
||||
|
||||
@ui.button(label="Yes", style=discord.ButtonStyle.success, emoji="✅")
|
||||
async def resolved_button_yes(self, interaction: discord.Interaction, button: ui.Button):
|
||||
async def resolved_button_yes(self, interaction: discord.Interaction, button: ui.Button): # pylint: disable=unused-variable
|
||||
request_role_ids = await self.config.guild(interaction.guild).request_roles()
|
||||
request_roles = [interaction.guild.get_role(role_id) for role_id in request_role_ids]
|
||||
match = any(role in interaction.user.roles for role in request_roles)
|
||||
|
@ -78,7 +78,7 @@ class Forums(commands.Cog):
|
|||
await interaction.response.send_message(content="You cannot close this thread!", ephemeral=True)
|
||||
|
||||
@ui.button(label="No", style=discord.ButtonStyle.danger, emoji="✖️")
|
||||
async def resolved_button_no(self, interaction: discord.Interaction, button: ui.Button):
|
||||
async def resolved_button_no(self, interaction: discord.Interaction, button: ui.Button): # pylint: disable=unused-variable
|
||||
request_role_ids = await self.config.guild(interaction.guild).request_roles()
|
||||
request_roles = [interaction.guild.get_role(role_id) for role_id in request_role_ids]
|
||||
match = any(role in interaction.user.roles for role in request_roles)
|
||||
|
@ -143,7 +143,6 @@ class Forums(commands.Cog):
|
|||
if role:
|
||||
if role.id in current_list:
|
||||
await ctx.send("This role is already in the allowed roles list!")
|
||||
return
|
||||
else:
|
||||
current_list.append(role.id)
|
||||
await self.config.guild(ctx.guild).request_roles.set(current_list)
|
||||
|
@ -187,7 +186,7 @@ class Forums(commands.Cog):
|
|||
msg = await ctx.reply("Select a forum tag below.")
|
||||
await msg.edit(view=SelectView(msg, options))
|
||||
else:
|
||||
await ctx.reply(f"Configuration error! Channel does not exist.")
|
||||
await ctx.reply("Configuration error! Channel does not exist.")
|
||||
|
||||
class Select(ui.Select):
|
||||
def __init__(self, message, options):
|
||||
|
|
Loading…
Reference in a new issue