From d468ecc8e0cddacbc4dd1fc99a519185ebd97f51 Mon Sep 17 00:00:00 2001 From: Anri Date: Wed, 14 Oct 2020 03:07:28 +0200 Subject: [PATCH] ajout aliases --- cogs/commands.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cogs/commands.py b/cogs/commands.py index f950b3c..dc1a215 100755 --- a/cogs/commands.py +++ b/cogs/commands.py @@ -24,9 +24,9 @@ class Commands(commands.Cog): await message.edit(embed = discord.Embed(color = randint(0, 0xFFFFFF), description = f':hourglass: {round(self.bot.latency * 1000)}ms\n\n:stopwatch: {ping2}ms\n\n:heartbeat: {ping}ms')) await ctx.message.add_reaction(emoji = '✅') - @commands.command() + @commands.command(aliases = ['calculatrice', 'calcu']) async def calc(self, ctx, *, msg): - """Calculatrice.\n ➡ Syntaxe: .calc ⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢""" + """Calculatrice.\n ➡ Syntaxe: .calc/calculatrice/calcu ⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢""" equation = msg.replace('^', '**').replace('x', '*').replace('×', '*').replace('÷', '/').replace('≥', '>=').replace('≤', '<=') try: try: @@ -66,9 +66,9 @@ class Commands(commands.Cog): async def calc_error(self, ctx, error): await ctx.send("Tu n'as pas spécifié de calcul.") - @commands.command() + @commands.command(aliases = ['syntaxe']) async def syntax(self, ctx): - """Informations pour bien éditer son texte.⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢""" + """Informations pour bien éditer son texte.⁢⁢⁢⁢⁢⁢⁢⁢⁢⁢\n ➡ Syntaxe: .syntax/syntaxe""" syntaxe = "-----------------------------------------------------\n" syntaxe += discord.utils.escape_markdown("```Js\n") syntaxe += discord.utils.escape_markdown("//code en js (possible de remplacer 'js' par d'autres languages . adaptez le !)\n")