ajout aliases

This commit is contained in:
Mylloon 2020-10-14 03:07:28 +02:00
parent 56be15c10f
commit d468ecc8e0

View file

@ -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 <calcul>"""
"""Calculatrice.\n ➡ Syntaxe: .calc/calculatrice/calcu <calcul>"""
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")