some minor changes

This commit is contained in:
bacon
2024-03-07 21:37:50 +03:00
parent 9934c5272c
commit 73cf9f3c6e
6 changed files with 10 additions and 90 deletions

View File

@@ -38,15 +38,15 @@ class Audio(commands.Cog, name='Audio'):
audio = await list_files()
if audio_db is not None:
logger.info(f'Play audio from DB')
logger.info('Play audio from DB')
await play_audio(f'audio/{random.choice(audio)}', self.bot, after.channel)
elif len(member.roles) == 1 or _role is None:
logger.info(f'Skip playing by role')
logger.info('Skip playing by role')
elif any(str(role.id) in _role for role in member.roles):
logger.info(f'Play audio from list by role')
logger.info('Play audio from list by role')
await play_audio(f'audio/{random.choice(audio)}', self.bot, after.channel)
else:
logger.info(f'Skip playing by any else')
logger.info('Skip playing by any else')
@commands.slash_command(name="play_audio",
description="Make possible playing audio by command",

View File

@@ -41,7 +41,7 @@ class General(commands.Cog):
audios = "Not selected audio"
emb = disnake.Embed(
title=f"General information",
title="General information",
description=f"General information on server about {user}",
color=Colour.random()
)

View File

@@ -23,8 +23,8 @@ class BotInfo(commands.Cog, name='Bot Info'):
_pid = os.getpid()
_process = psutil.Process(_pid)
emb = disnake.Embed(
title=f"General information",
description=f"General information on about bot",
title="General information",
description="General information on about bot",
)
emb.set_thumbnail(self.bot.user.avatar.url)
emb.add_field(name="System info:", value=f"Memory Usage: {round(_process.memory_info().rss / 2 ** 20, 2)} Mb\n"
@@ -33,7 +33,7 @@ class BotInfo(commands.Cog, name='Bot Info'):
f'Prefix: `{determine_prefix(self.bot, inter)}\n`'
f"Max audio duration: {determine_time(inter)} sec\n"
)
emb.add_field(name="Bot info:", value=f"Bot owner: <@386629192743256065>\n"
emb.add_field(name="Bot info:", value="Bot owner: <@386629192743256065>\n"
f"Bot version: {ver.major}.{ver.minor}.{ver.micro}-{ver.releaselevel}")
emb.set_footer(text="Information requested by: {}".format(inter.author.display_name))