Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/tako-discord/tako
Browse files Browse the repository at this point in the history
  • Loading branch information
Pukimaa committed Feb 2, 2023
2 parents edf461f + 0215f24 commit 1fbadb5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions cogs/config/autojoin.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,10 @@ async def autojoin_logic(
or role.is_bot_managed()
or role.managed
or not role.is_assignable()
or role >= interaction.user.top_role # type: ignore
and interaction.guild.owner_id != interaction.user.id if interaction.guild else True
or role >= interaction.user.top_role # type: ignore
and interaction.guild.owner_id != interaction.user.id
if interaction.guild
else True
):
return await interaction.response.send_message(
i18n.t("config.invalid_role", locale=language), ephemeral=True
Expand Down Expand Up @@ -134,7 +136,7 @@ async def list(self, interaction: discord.Interaction):
locale=language,
),
description=i18n.t("config.autojoinroles_desc", locale=language),
color=await get_color(self.bot, interaction.guild.id), # type: ignore
color=await get_color(self.bot, interaction.guild.id), # type: ignore
)
embed.set_thumbnail(url="attachment://thumbnail.png")
if not data:
Expand Down Expand Up @@ -162,7 +164,7 @@ async def list(self, interaction: discord.Interaction):
inline=False,
)
await interaction.followup.send(embed=embed, file=file)
delete_thumbnail(interaction.guild_id, "role") # type: ignore
delete_thumbnail(interaction.guild_id, "role") # type: ignore

@commands.Cog.listener()
async def on_member_join(self, member: discord.Member):
Expand Down

0 comments on commit 1fbadb5

Please sign in to comment.