This commit is contained in:
bot
2024-03-25 10:14:57 +03:00
parent c3140403b5
commit 78be10a88b
4 changed files with 12 additions and 6 deletions

View File

@@ -57,6 +57,8 @@ class Admin(commands.Cog, name='Admin'):
bot_role = read_json(member.guild.id, 'bot_role') # Get bot role
guest_role = read_json(member.guild.id, 'guest_role') # Get guest role
logger.info(f"Bot role: {bot_role} | Guest role: {guest_role}")
logger.info(f'type bot_role: {type(bot_role)} | type guest_role: {type(guest_role)}')
if bot_role or guest_role:
if member.bot == 0:
role = disnake.utils.get(member.guild.roles, id=guest_role)
@@ -77,6 +79,7 @@ class Admin(commands.Cog, name='Admin'):
)
@commands.has_permissions(administrator=True)
async def set_guest_role(self, inter: disnake.ApplicationCommandInteraction, role):
print(type(role.id))
await write_json(inter.guild.id, "guest_role", role.id)
await inter.response.send_message(f"Set up bot role to: `{role.name}`", ephemeral=True)