code cleanup
This commit is contained in:
@@ -5,7 +5,7 @@ import psutil
|
||||
from disnake.ext import commands
|
||||
|
||||
from __init__ import version_info as ver
|
||||
from lib import determine_prefix, determine_time
|
||||
from lib import determine_prefix
|
||||
from lib import logger
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ class BotInfo(commands.Cog, name='Bot Info'):
|
||||
|
||||
@commands.slash_command(name="info_bot",
|
||||
description='Shows general info about bot') # this is for making a command
|
||||
async def info_bot(self, inter):
|
||||
async def info_bot(self, inter: disnake.ApplicationCommandInteraction):
|
||||
_pid = os.getpid()
|
||||
_process = psutil.Process(_pid)
|
||||
emb = disnake.Embed(
|
||||
@@ -31,11 +31,10 @@ class BotInfo(commands.Cog, name='Bot Info'):
|
||||
f"CPU Usage: {_process.cpu_percent()}%\n"
|
||||
f'Bot ping: {round(self.bot.latency * 1000)}\n'
|
||||
f'Prefix: `{determine_prefix(self.bot, inter)}\n`'
|
||||
f"Max audio duration: {determine_time(inter)} sec\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))
|
||||
emb.set_footer(text=f"Information requested by: {inter.author.display_name}")
|
||||
|
||||
await inter.response.send_message(embed=emb, ephemeral=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user