reorganize stats command
@@ -245,6 +245,7 @@ class Useful(commands.Cog):
async def stats(self, ctx):
uptime = (arrow.utcnow() - self.d.start_time)
uptime_seconds = uptime.seconds + (uptime.days * 24 * 3600)
+
mem_usage = psutil.Process().memory_full_info().uss
embed = discord.Embed(color=self.d.cc)
@@ -258,14 +259,14 @@ class Useful(commands.Cog):
f'{ctx.l.useful.stats.cmds_sec}: `{round(self.d.cmd_count / uptime_seconds, 2)}`\n' \
f'{ctx.l.useful.stats.votes}: `{self.d.votes_topgg}`\n' \
f'{ctx.l.useful.stats.topgg}: `{round((self.d.votes_topgg / uptime_seconds) * 3600, 2)}`\n'
- embed.add_field(name='\uFEFF', value=col_1)
+ embed.add_field(name=col_1, value='\uFEFF')
col_2 = f'{ctx.l.useful.stats.mem}: `{round(mem_usage / 1048576, 2)} MiB / {round(mem_usage / 1000000, 2)} MB`\n' \
f'{ctx.l.useful.stats.ping}: `{round(self.bot.latency * 1000, 2)} ms`\n' \
f'{ctx.l.useful.stats.shards}: `{self.bot.shard_count}`\n' \
- f'{ctx.l.useful.stats.uptime}: `{uptime_seconds}`\n'
- embed.add_field(name='\uFEFF', value=col_2)
+ f'{ctx.l.useful.stats.uptime}: `{uptime_seconds}s`\n'
+ embed.add_field(name=col_2, value='\uFEFF')
await ctx.send(embed=embed)
