Ajouts de syntaxe
This commit is contained in:
parent
6e012b3121
commit
040676c7c7
1 changed files with 4 additions and 4 deletions
|
@ -35,9 +35,9 @@ class Commands(commands.Cog):
|
||||||
description = f':hourglass: {round(self.bot.latency * 1000)}ms\n\n:stopwatch: {ping2}ms\n\n:heartbeat: {ping}ms'))
|
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 = '✅')
|
await ctx.message.add_reaction(emoji = '✅')
|
||||||
|
|
||||||
@commands.command(aliases = ['calculatrice', 'calcu'])
|
@commands.command(aliases = ['calculatrice', 'calcu' 'calcul'])
|
||||||
async def calc(self, ctx, *, msg):
|
async def calc(self, ctx, *, msg):
|
||||||
"""Calculatrice.\n ➡ Syntaxe: .calc/calculatrice/calcu <calcul>"""
|
"""Calculatrice.\n ➡ Syntaxe: .calc/calculatrice/calcu/calcul <calcul>"""
|
||||||
equation = msg.replace('^', '**').replace('x', '*').replace('×', '*').replace('÷', '/').replace('≥', '>=').replace('≤', '<=')
|
equation = msg.replace('^', '**').replace('x', '*').replace('×', '*').replace('÷', '/').replace('≥', '>=').replace('≤', '<=')
|
||||||
try:
|
try:
|
||||||
try:
|
try:
|
||||||
|
@ -77,9 +77,9 @@ class Commands(commands.Cog):
|
||||||
async def calc_error(self, ctx, error):
|
async def calc_error(self, ctx, error):
|
||||||
await ctx.send("Tu n'as pas spécifié de calcul.")
|
await ctx.send("Tu n'as pas spécifié de calcul.")
|
||||||
|
|
||||||
@commands.command()
|
@commands.command(aliases = ['syntaxe'])
|
||||||
async def syntax(self, ctx):
|
async def syntax(self, ctx):
|
||||||
"""Informations pour bien éditer son texte."""
|
"""Informations pour bien éditer son texte.\n ➡ Syntaxe: .syntax/syntaxe"""
|
||||||
syntaxe = "-----------------------------------------------------\n"
|
syntaxe = "-----------------------------------------------------\n"
|
||||||
syntaxe += discord.utils.escape_markdown("```Js\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")
|
syntaxe += discord.utils.escape_markdown("//code en js (possible de remplacer 'js' par d'autres languages . adaptez le !)\n")
|
||||||
|
|
Reference in a new issue