From f65c9ea7253dbc5eb26b67a21ab73f4f9124c410 Mon Sep 17 00:00:00 2001 From: Anri Kennel Date: Mon, 9 Nov 2020 09:52:00 +0100 Subject: [PATCH] =?UTF-8?q?Commande=20info=20:=20R=C3=A9cup=C3=A9ration=20?= =?UTF-8?q?du=20nom=20du=20bot/owner=20depuis=20Discord=20+=20changement?= =?UTF-8?q?=20nom?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cogs/commands.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/cogs/commands.py b/cogs/commands.py index 7dc690b..0fa3757 100755 --- a/cogs/commands.py +++ b/cogs/commands.py @@ -115,12 +115,14 @@ class Commands(commands.Cog): await ctx.message.add_reaction(emoji = '✅') await ctx.send(syntaxe) - @commands.command(aliases = ['infos']) - async def info(self, ctx): - """Donne des infos sur le bot.\n ➡ Syntaxe: .info/infos⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢""" - embed = discord.Embed(url = 'https://github.com/Mylloon', color = randint(0, 0xFFFFFF)) # pub gratuite + @commands.command(aliases = ['info']) + async def infos(self, ctx): + """Donne des infos sur le KassouBot.\n ➡ Syntaxe: .infos/info⁢""" + appinfo = await self.bot.application_info() - embed.set_author(name='Bot Licence L1', icon_url=ctx.author.avatar_url) + embed = discord.Embed(color = randint(0, 0xFFFFFF)) + + embed.set_author(name=appinfo.name, icon_url=self.bot.user.avatar_url) # liste utilisateurs de tous les serveurs où le bot est, en ligne total_online = len({m.id for m in self.bot.get_all_members() if m.status is discord.Status.online}) @@ -136,7 +138,7 @@ class Commands(commands.Cog): text = len(text_channels) voice = len(voice_channels) - embed.add_field(name='Développeur', value='Mylloon#7869') # pub encore + embed.add_field(name='Dev', value=f"[{appinfo.owner}](https://github.com/Mylloon)") # pub gratuite embed.add_field(name='Serveurs', value=len(self.bot.guilds)) embed.add_field(name='Membres', value=f'{total_unique} au total\n{total_online} en ligne') embed.add_field(name='Channels', value=f'{text} textuelles\n{voice} vocales')