Ajout du bon prefix dans la commande help
This commit is contained in:
parent
6390f6b6ca
commit
466d8054f7
7 changed files with 33 additions and 33 deletions
|
@ -14,7 +14,7 @@ class Fun(commands.Cog):
|
||||||
|
|
||||||
@commands.command(name='iq')
|
@commands.command(name='iq')
|
||||||
async def _iq(self, ctx, *, user = '0'):
|
async def _iq(self, ctx, *, user = '0'):
|
||||||
"""Calcule ton IQ.\n ➡ Syntaxe: .iq [user]"""
|
"""Calcule ton IQ.\n ➡ Syntaxe: {PREFIX}iq [user]"""
|
||||||
if user == '0':
|
if user == '0':
|
||||||
user = ctx.author
|
user = ctx.author
|
||||||
await ctx.message.add_reaction(emoji = '✅')
|
await ctx.message.add_reaction(emoji = '✅')
|
||||||
|
@ -41,7 +41,7 @@ class Fun(commands.Cog):
|
||||||
|
|
||||||
@commands.command(name='love')
|
@commands.command(name='love')
|
||||||
async def _love(self, ctx, *users: discord.Member):
|
async def _love(self, ctx, *users: discord.Member):
|
||||||
"""Découvre la probabilité que ces deux personnes se mettent en couple.\n ➡ Syntaxe: .love <User1> <User2>"""
|
"""Découvre la probabilité que ces deux personnes se mettent en couple.\n ➡ Syntaxe: {PREFIX}love <User1> <User2>"""
|
||||||
if len(users) == 2 or len(users) == 1:
|
if len(users) == 2 or len(users) == 1:
|
||||||
UneDemande = False
|
UneDemande = False
|
||||||
if len(users) == 1:
|
if len(users) == 1:
|
||||||
|
@ -93,7 +93,7 @@ class Fun(commands.Cog):
|
||||||
|
|
||||||
@commands.command(name='8ball', aliases=['8b', '8balls'])
|
@commands.command(name='8ball', aliases=['8b', '8balls'])
|
||||||
async def _8ball(self, ctx, *, question):
|
async def _8ball(self, ctx, *, question):
|
||||||
"""Répond à ta question 🔮.\n ➡ Syntaxe: .8ball/8b <question>"""
|
"""Répond à ta question 🔮.\n ➡ Syntaxe: {PREFIX}8ball/8b <question>"""
|
||||||
reponses=["c'est sûr.","il en est décidément ainsi.","incontestablement.","oui sans aucun doute.","tu peux t'y fier.","tel que je le vois, oui.","c'est le plus probable.",
|
reponses=["c'est sûr.","il en est décidément ainsi.","incontestablement.","oui sans aucun doute.","tu peux t'y fier.","tel que je le vois, oui.","c'est le plus probable.",
|
||||||
"cela montre de bonnes perspectives.","certes.","les signes indiquent que oui.","ma réponse est oui.","ta question est trop floue, réessaie.","redemandes plus tard stp.",
|
"cela montre de bonnes perspectives.","certes.","les signes indiquent que oui.","ma réponse est oui.","ta question est trop floue, réessaie.","redemandes plus tard stp.",
|
||||||
"je ferais mieux de pas te le dire maintenant...","je ne peux pas le prédire actuellement :/","concentre-toi et redemande.","n'y comptes pas trop.","ma réponse est non.",
|
"je ferais mieux de pas te le dire maintenant...","je ne peux pas le prédire actuellement :/","concentre-toi et redemande.","n'y comptes pas trop.","ma réponse est non.",
|
||||||
|
@ -106,7 +106,7 @@ class Fun(commands.Cog):
|
||||||
|
|
||||||
@commands.command(name='pileouface', aliases=['pf'])
|
@commands.command(name='pileouface', aliases=['pf'])
|
||||||
async def _pileouface(self, ctx):
|
async def _pileouface(self, ctx):
|
||||||
"""Pile ou face.\n ➡ Syntaxe: .pileouface/pf"""
|
"""Pile ou face.\n ➡ Syntaxe: {PREFIX}pileouface/pf"""
|
||||||
await ctx.message.add_reaction(emoji = '✅')
|
await ctx.message.add_reaction(emoji = '✅')
|
||||||
return await ctx.send(f"{'Pile' if randint(0,1) == 1 else 'Face'} !")
|
return await ctx.send(f"{'Pile' if randint(0,1) == 1 else 'Face'} !")
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ class Games(commands.Cog):
|
||||||
|
|
||||||
@commands.command(name='chifumi', aliases = ["shifumi", "ppc"])
|
@commands.command(name='chifumi', aliases = ["shifumi", "ppc"])
|
||||||
async def _chifumi(self, ctx, *, choix):
|
async def _chifumi(self, ctx, *, choix):
|
||||||
"""Un simple Chifumi contre le bot.\n ➡ Syntaxe: .chifumi/shifumi/ppc <pierre/papier/ciseaux>"""
|
"""Un simple Chifumi contre le bot.\n ➡ Syntaxe: {PREFIX}chifumi/shifumi/ppc <pierre/papier/ciseaux>"""
|
||||||
|
|
||||||
choix_jeu = ["Pierre ✊", "Papier 🧻", "Ciseaux ✂"]
|
choix_jeu = ["Pierre ✊", "Papier 🧻", "Ciseaux ✂"]
|
||||||
orditxt = choice(choix_jeu)
|
orditxt = choice(choix_jeu)
|
||||||
|
@ -47,7 +47,7 @@ class Games(commands.Cog):
|
||||||
|
|
||||||
@commands.command(name='plusoumoins', aliases = ['+ou-', '+-'])
|
@commands.command(name='plusoumoins', aliases = ['+ou-', '+-'])
|
||||||
async def _plusoumoins(self, ctx):
|
async def _plusoumoins(self, ctx):
|
||||||
"""Un plus ou moins entre 1 et 100.\n ➡ Syntaxe: .plusoumoins/+ou-/+-"""
|
"""Un plus ou moins entre 1 et 100.\n ➡ Syntaxe: {PREFIX}plusoumoins/+ou-/+-"""
|
||||||
if str(ctx.author.id) in self.guessing_game:
|
if str(ctx.author.id) in self.guessing_game:
|
||||||
return await ctx.send("Tu es déjà en partie.")
|
return await ctx.send("Tu es déjà en partie.")
|
||||||
guess = 5
|
guess = 5
|
||||||
|
|
|
@ -13,7 +13,7 @@ class Help(commands.Cog):
|
||||||
|
|
||||||
@commands.command(name='help')
|
@commands.command(name='help')
|
||||||
async def _help(self, ctx, *cog):
|
async def _help(self, ctx, *cog):
|
||||||
"""Affiche toutes les commandes du bot.\n ➡ Syntaxe: .help [catégorie]"""
|
"""Affiche toutes les commandes du bot.\n ➡ Syntaxe: {PREFIX}help [catégorie]"""
|
||||||
if not cog:
|
if not cog:
|
||||||
"""Liste des Cog"""
|
"""Liste des Cog"""
|
||||||
halp=discord.Embed(title = 'Liste des catégories et commandes sans catégorie',
|
halp=discord.Embed(title = 'Liste des catégories et commandes sans catégorie',
|
||||||
|
@ -52,7 +52,7 @@ class Help(commands.Cog):
|
||||||
halp = discord.Embed(title = f'{cog[0]} - Liste des commandes', description = self.client.cogs[cog[0]].__doc__, color = discord.Colour.random())
|
halp = discord.Embed(title = f'{cog[0]} - Liste des commandes', description = self.client.cogs[cog[0]].__doc__, color = discord.Colour.random())
|
||||||
for c in self.client.get_cog(y).get_commands():
|
for c in self.client.get_cog(y).get_commands():
|
||||||
if not c.hidden:
|
if not c.hidden:
|
||||||
cmds_help = str(c.help).split("\n")
|
cmds_help = str(c.help).replace("{PREFIX}", ctx.prefix).split("\n")
|
||||||
del cmds_help[0]
|
del cmds_help[0]
|
||||||
backslash = '\n'
|
backslash = '\n'
|
||||||
halp.add_field(name = f"`{ctx.prefix}{c.name}` - {str(c.help).split(backslash)[0]}", value = f"{''.join(cmds_help)}\u200b", inline = False)
|
halp.add_field(name = f"`{ctx.prefix}{c.name}` - {str(c.help).split(backslash)[0]}", value = f"{''.join(cmds_help)}\u200b", inline = False)
|
||||||
|
|
|
@ -32,7 +32,7 @@ class Internet(commands.Cog):
|
||||||
|
|
||||||
@commands.command(name='memes', aliases = ['meme'])
|
@commands.command(name='memes', aliases = ['meme'])
|
||||||
async def _memes(self, ctx, *, args = None):
|
async def _memes(self, ctx, *, args = None):
|
||||||
"""Envois un meme de reddit.\n ➡ Syntaxe: .memes/meme [subreddit]"""
|
"""Envois un meme de reddit.\n ➡ Syntaxe: {PREFIX}memes/meme [subreddit]"""
|
||||||
|
|
||||||
if args: # s'il y a un subreddit de défini
|
if args: # s'il y a un subreddit de défini
|
||||||
subredditchoix = args
|
subredditchoix = args
|
||||||
|
@ -87,7 +87,7 @@ class Internet(commands.Cog):
|
||||||
|
|
||||||
@commands.command(name='cat', aliases = ['chat'])
|
@commands.command(name='cat', aliases = ['chat'])
|
||||||
async def _cat(self, ctx):
|
async def _cat(self, ctx):
|
||||||
"""Te montre un magnifique chat\n ➡ Syntaxe: .cat/chat"""
|
"""Te montre un magnifique chat\n ➡ Syntaxe: {PREFIX}cat/chat"""
|
||||||
|
|
||||||
if ctx.author.nick:
|
if ctx.author.nick:
|
||||||
name = f"{ctx.author.nick} ({ctx.author.name}#{ctx.author.discriminator})"
|
name = f"{ctx.author.nick} ({ctx.author.name}#{ctx.author.discriminator})"
|
||||||
|
@ -103,7 +103,7 @@ class Internet(commands.Cog):
|
||||||
|
|
||||||
@commands.command(name='dog', aliases = ['chien'])
|
@commands.command(name='dog', aliases = ['chien'])
|
||||||
async def _dog(self, ctx):
|
async def _dog(self, ctx):
|
||||||
"""Te montre un magnifique chien\n ➡ Syntaxe: .dog/chien"""
|
"""Te montre un magnifique chien\n ➡ Syntaxe: {PREFIX}dog/chien"""
|
||||||
|
|
||||||
if ctx.author.nick:
|
if ctx.author.nick:
|
||||||
name = f"{ctx.author.nick} ({ctx.author.name}#{ctx.author.discriminator})"
|
name = f"{ctx.author.nick} ({ctx.author.name}#{ctx.author.discriminator})"
|
||||||
|
@ -119,7 +119,7 @@ class Internet(commands.Cog):
|
||||||
|
|
||||||
@commands.command(name='sexe', aliases=['sexes', 'nude', 'nudes', 'nsfw'])
|
@commands.command(name='sexe', aliases=['sexes', 'nude', 'nudes', 'nsfw'])
|
||||||
async def _sexe(self, ctx, *, choice_of_nsfw = None):
|
async def _sexe(self, ctx, *, choice_of_nsfw = None):
|
||||||
"""Envois une image coquine. (NSFW)\n ➡ Syntaxe: .sexe/sexes/nude/nudes [butts/boobs]"""
|
"""Envois une image coquine. (NSFW)\n ➡ Syntaxe: {PREFIX}sexe/sexes/nude/nudes [butts/boobs]"""
|
||||||
liste_hot = ['butts', 'boobs']
|
liste_hot = ['butts', 'boobs']
|
||||||
if choice_of_nsfw in liste_hot:
|
if choice_of_nsfw in liste_hot:
|
||||||
pass
|
pass
|
||||||
|
@ -138,7 +138,7 @@ class Internet(commands.Cog):
|
||||||
|
|
||||||
@commands.command(name='news', aliases=['rss'])
|
@commands.command(name='news', aliases=['rss'])
|
||||||
async def _news(self, ctx, *, arg = ""):
|
async def _news(self, ctx, *, arg = ""):
|
||||||
"""Info random dans le domaine de l'informatique\n ➡ Syntaxe: .news/rss [site/liste]"""
|
"""Info random dans le domaine de l'informatique\n ➡ Syntaxe: {PREFIX}news/rss [site/liste]"""
|
||||||
|
|
||||||
rss_website = {
|
rss_website = {
|
||||||
"anandtech": "https://www.anandtech.com/rss/",
|
"anandtech": "https://www.anandtech.com/rss/",
|
||||||
|
|
|
@ -301,7 +301,7 @@ class Music(commands.Cog):
|
||||||
|
|
||||||
@commands.command(name='join', aliases=['j'], invoke_without_subcommand=True)
|
@commands.command(name='join', aliases=['j'], invoke_without_subcommand=True)
|
||||||
async def _summon(self, ctx: commands.Context, *, channel: discord.VoiceChannel = None):
|
async def _summon(self, ctx: commands.Context, *, channel: discord.VoiceChannel = None):
|
||||||
"""Se connecte au salon vocal.\n ➡ Syntaxe: .connect/join"""
|
"""Se connecte au salon vocal.\n ➡ Syntaxe: {PREFIX}connect/join"""
|
||||||
|
|
||||||
if not channel and not ctx.author.voice:
|
if not channel and not ctx.author.voice:
|
||||||
await ctx.send("Aucun channel à rejoindre. Connecte toi dans un vocal ou donne-moi son id.")
|
await ctx.send("Aucun channel à rejoindre. Connecte toi dans un vocal ou donne-moi son id.")
|
||||||
|
@ -317,7 +317,7 @@ class Music(commands.Cog):
|
||||||
|
|
||||||
@commands.command(name='stop', aliases=['disconnect', 'dc'])
|
@commands.command(name='stop', aliases=['disconnect', 'dc'])
|
||||||
async def _leave(self, ctx: commands.Context):
|
async def _leave(self, ctx: commands.Context):
|
||||||
"""Arrête la chanson en cours de lecture et quitte le salon vocal.\n ➡ Syntaxe: .disconnect/dc/stop"""
|
"""Arrête la chanson en cours de lecture et quitte le salon vocal.\n ➡ Syntaxe: {PREFIX}disconnect/dc/stop"""
|
||||||
|
|
||||||
if not ctx.voice_state.voice:
|
if not ctx.voice_state.voice:
|
||||||
embed = discord.Embed(description = f"Tape `{ctx.prefix}play <chanson>` pour jouer quelque chose ou `{ctx.prefix}join [id]` pour me connecter à un salon vocal.", color = 0xC41B1B)
|
embed = discord.Embed(description = f"Tape `{ctx.prefix}play <chanson>` pour jouer quelque chose ou `{ctx.prefix}join [id]` pour me connecter à un salon vocal.", color = 0xC41B1B)
|
||||||
|
@ -330,7 +330,7 @@ class Music(commands.Cog):
|
||||||
|
|
||||||
@commands.command(name='volume', aliases=['vol'])
|
@commands.command(name='volume', aliases=['vol'])
|
||||||
async def _volume(self, ctx: commands.Context, *, volume: int = False):
|
async def _volume(self, ctx: commands.Context, *, volume: int = False):
|
||||||
"""Modifie le volume du bot (entre 1 et 100).\n ➡ Syntaxe: .volume/vol [1;100]"""
|
"""Modifie le volume du bot (entre 1 et 100).\n ➡ Syntaxe: {PREFIX}volume/vol [1;100]"""
|
||||||
|
|
||||||
if not ctx.voice_state.is_playing:
|
if not ctx.voice_state.is_playing:
|
||||||
return await ctx.send("Rien n'est joué pour le moment.")
|
return await ctx.send("Rien n'est joué pour le moment.")
|
||||||
|
@ -346,7 +346,7 @@ class Music(commands.Cog):
|
||||||
|
|
||||||
@commands.command(name='now', aliases=['current', 'playing', 'np'])
|
@commands.command(name='now', aliases=['current', 'playing', 'np'])
|
||||||
async def _now(self, ctx: commands.Context):
|
async def _now(self, ctx: commands.Context):
|
||||||
"""Affiche des informations sur la chanson en cours de lecture.\n ➡ Syntaxe: .now/current/playing/np"""
|
"""Affiche des informations sur la chanson en cours de lecture.\n ➡ Syntaxe: {PREFIX}now/current/playing/np"""
|
||||||
|
|
||||||
await ctx.send(embed=ctx.voice_state.current.create_embed())
|
await ctx.send(embed=ctx.voice_state.current.create_embed())
|
||||||
|
|
||||||
|
@ -383,7 +383,7 @@ class Music(commands.Cog):
|
||||||
|
|
||||||
@commands.command(name='skip', aliases=['s'])
|
@commands.command(name='skip', aliases=['s'])
|
||||||
async def _skip(self, ctx: commands.Context):
|
async def _skip(self, ctx: commands.Context):
|
||||||
"""Passe la chanson.\n ➡ Syntaxe: .skip/s"""
|
"""Passe la chanson.\n ➡ Syntaxe: {PREFIX}skip/s"""
|
||||||
|
|
||||||
if not ctx.voice_state.is_playing:
|
if not ctx.voice_state.is_playing:
|
||||||
embed = discord.Embed(description = f"Tape `{ctx.prefix}play <chanson>` pour jouer quelque chose.", color = 0xC41B1B)
|
embed = discord.Embed(description = f"Tape `{ctx.prefix}play <chanson>` pour jouer quelque chose.", color = 0xC41B1B)
|
||||||
|
@ -396,7 +396,7 @@ class Music(commands.Cog):
|
||||||
|
|
||||||
@commands.command(name='queue', aliases=['q', 'playlist'])
|
@commands.command(name='queue', aliases=['q', 'playlist'])
|
||||||
async def _queue(self, ctx: commands.Context, *, page: int = 1):
|
async def _queue(self, ctx: commands.Context, *, page: int = 1):
|
||||||
"""Affiche la file d'attente des chansons à venir.\n ➡ Syntaxe: .queue/q/playlist [page]"""
|
"""Affiche la file d'attente des chansons à venir.\n ➡ Syntaxe: {PREFIX}queue/q/playlist [page]"""
|
||||||
|
|
||||||
if len(ctx.voice_state.songs) == 0:
|
if len(ctx.voice_state.songs) == 0:
|
||||||
embed = discord.Embed(description = f"Tape `{ctx.prefix}play <chanson>` pour jouer quelque chose.", color = 0xC41B1B)
|
embed = discord.Embed(description = f"Tape `{ctx.prefix}play <chanson>` pour jouer quelque chose.", color = 0xC41B1B)
|
||||||
|
@ -447,7 +447,7 @@ class Music(commands.Cog):
|
||||||
|
|
||||||
@commands.command(name='loop', aliases=['repeat'])
|
@commands.command(name='loop', aliases=['repeat'])
|
||||||
async def _loop(self, ctx: commands.Context):
|
async def _loop(self, ctx: commands.Context):
|
||||||
"""Répète la chanson actuellement en lecture.\n ➡ Syntaxe: .loop/repeat"""
|
"""Répète la chanson actuellement en lecture.\n ➡ Syntaxe: {PREFIX}loop/repeat"""
|
||||||
|
|
||||||
if not ctx.voice_state.is_playing:
|
if not ctx.voice_state.is_playing:
|
||||||
embed = discord.Embed(description = f"Tape `{ctx.prefix}play <chanson>` pour jouer quelque chose.", color = 0xC41B1B)
|
embed = discord.Embed(description = f"Tape `{ctx.prefix}play <chanson>` pour jouer quelque chose.", color = 0xC41B1B)
|
||||||
|
@ -461,7 +461,7 @@ class Music(commands.Cog):
|
||||||
|
|
||||||
@commands.command(name='play', aliases=['p'])
|
@commands.command(name='play', aliases=['p'])
|
||||||
async def _play(self, ctx: commands.Context, *, search: str):
|
async def _play(self, ctx: commands.Context, *, search: str):
|
||||||
"""Recherche une chanson sur les sites compatibles avec YoutubeDL si aucun URL n'est donné et l'ajoute à la file d'attente.\n ➡ Syntaxe: .play/p"""
|
"""Recherche une chanson sur les sites compatibles avec YoutubeDL si aucun URL n'est donné et l'ajoute à la file d'attente.\n ➡ Syntaxe: {PREFIX}play/p"""
|
||||||
|
|
||||||
if not ctx.voice_state.voice:
|
if not ctx.voice_state.voice:
|
||||||
await ctx.invoke(self._summon)
|
await ctx.invoke(self._summon)
|
||||||
|
@ -489,7 +489,7 @@ class Music(commands.Cog):
|
||||||
|
|
||||||
@commands.command(name='lyrics', aliases = ['l', 'lyric'])
|
@commands.command(name='lyrics', aliases = ['l', 'lyric'])
|
||||||
async def _lyrics(self, ctx, *, song: str = None):
|
async def _lyrics(self, ctx, *, song: str = None):
|
||||||
"""Affiche les paroles de la musique en cours, ou de la chanson spécifiée.\n ➡ Syntaxe: .lyrics/lyric/l (musique)"""
|
"""Affiche les paroles de la musique en cours, ou de la chanson spécifiée.\n ➡ Syntaxe: {PREFIX}lyrics/lyric/l (musique)"""
|
||||||
if song or ctx.voice_state.is_playing:
|
if song or ctx.voice_state.is_playing:
|
||||||
if not song:
|
if not song:
|
||||||
song = f"{ctx.voice_state.current.title()}"
|
song = f"{ctx.voice_state.current.title()}"
|
||||||
|
|
|
@ -13,7 +13,7 @@ class School(commands.Cog):
|
||||||
@commands.command(name='appel')
|
@commands.command(name='appel')
|
||||||
# @commands.has_any_role("Professeur", "professeur", "Prof", "prof")
|
# @commands.has_any_role("Professeur", "professeur", "Prof", "prof")
|
||||||
async def _appel(self, ctx, *, voice_channel: int = None):
|
async def _appel(self, ctx, *, voice_channel: int = None):
|
||||||
"""Fais l'appel.\n ➡ Syntaxe: .appel [ID salon vocal]"""
|
"""Fais l'appel.\n ➡ Syntaxe: {PREFIX}appel [ID salon vocal]"""
|
||||||
voice_channels = []
|
voice_channels = []
|
||||||
voice_channels.extend(ctx.guild.voice_channels)
|
voice_channels.extend(ctx.guild.voice_channels)
|
||||||
await ctx.message.add_reaction(emoji = "✅")
|
await ctx.message.add_reaction(emoji = "✅")
|
||||||
|
|
|
@ -18,7 +18,7 @@ class Utils(commands.Cog):
|
||||||
|
|
||||||
@commands.command(name='ping')
|
@commands.command(name='ping')
|
||||||
async def _ping(self, ctx, *, question = '0'):
|
async def _ping(self, ctx, *, question = '0'):
|
||||||
"""Affiche mon ping.\n ➡ Syntaxe: .ping [help]"""
|
"""Affiche mon ping.\n ➡ Syntaxe: {PREFIX}ping [help]"""
|
||||||
if question == 'help':
|
if question == 'help':
|
||||||
return await ctx.send(embed = discord.Embed(color = discord.Colour.random(), description = ":hourglass: correspond au temps entre deux battements de cœurs\n\n:stopwatch: correspond au temps que met le client a calculer le ping\n\n:heartbeat: correspond au temps que met le client a réagir au messages"))
|
return await ctx.send(embed = discord.Embed(color = discord.Colour.random(), description = ":hourglass: correspond au temps entre deux battements de cœurs\n\n:stopwatch: correspond au temps que met le client a calculer le ping\n\n:heartbeat: correspond au temps que met le client a réagir au messages"))
|
||||||
else:
|
else:
|
||||||
|
@ -32,7 +32,7 @@ class Utils(commands.Cog):
|
||||||
|
|
||||||
@commands.command(name='avatar')
|
@commands.command(name='avatar')
|
||||||
async def _avatar(self, ctx, *, user = '0'):
|
async def _avatar(self, ctx, *, user = '0'):
|
||||||
"""Affiche ton avatar ou celui que tu mentionnes.\n ➡ Syntaxe: .avatar [user]"""
|
"""Affiche ton avatar ou celui que tu mentionnes.\n ➡ Syntaxe: {PREFIX}avatar [user]"""
|
||||||
if user == '0':
|
if user == '0':
|
||||||
user = ctx.author
|
user = ctx.author
|
||||||
else:
|
else:
|
||||||
|
@ -45,7 +45,7 @@ class Utils(commands.Cog):
|
||||||
|
|
||||||
@commands.command(name='calc')
|
@commands.command(name='calc')
|
||||||
async def _calc(self, ctx, *, msg):
|
async def _calc(self, ctx, *, msg):
|
||||||
"""Calculatrice.\n ➡ Syntaxe: .calc <calcul>"""
|
"""Calculatrice.\n ➡ Syntaxe: {PREFIX}calc <calcul>"""
|
||||||
equation = msg.replace('^', '**').replace('x', '*').replace('×', '*').replace('÷', '/').replace('≥', '>=').replace('≤', '<=')
|
equation = msg.replace('^', '**').replace('x', '*').replace('×', '*').replace('÷', '/').replace('≥', '>=').replace('≤', '<=')
|
||||||
try:
|
try:
|
||||||
try:
|
try:
|
||||||
|
@ -133,7 +133,7 @@ class Utils(commands.Cog):
|
||||||
|
|
||||||
@commands.command(name='memo', aliases = ['note'])
|
@commands.command(name='memo', aliases = ['note'])
|
||||||
async def _memo(self, ctx, *, text):
|
async def _memo(self, ctx, *, text):
|
||||||
"""T'envoie un petit memo par message privé.\n ➡ Syntaxe: .memo/note <message>"""
|
"""T'envoie un petit memo par message privé.\n ➡ Syntaxe: {PREFIX}memo/note <message>"""
|
||||||
if len(text) <= 5:
|
if len(text) <= 5:
|
||||||
await ctx.message.add_reaction(emoji = '❌')
|
await ctx.message.add_reaction(emoji = '❌')
|
||||||
return await ctx.send("Ta note doit au moins faire 5 caractères.")
|
return await ctx.send("Ta note doit au moins faire 5 caractères.")
|
||||||
|
@ -154,7 +154,7 @@ class Utils(commands.Cog):
|
||||||
|
|
||||||
@commands.command(name='infos', aliases = ['info'])
|
@commands.command(name='infos', aliases = ['info'])
|
||||||
async def _infos(self, ctx):
|
async def _infos(self, ctx):
|
||||||
"""Donne des infos sur le bot.\n ➡ Syntaxe: .infos/info"""
|
"""Donne des infos sur le bot.\n ➡ Syntaxe: {PREFIX}infos/info"""
|
||||||
appinfo = await self.client.application_info()
|
appinfo = await self.client.application_info()
|
||||||
|
|
||||||
embed = discord.Embed(color = discord.Colour.random())
|
embed = discord.Embed(color = discord.Colour.random())
|
||||||
|
@ -215,7 +215,7 @@ class Utils(commands.Cog):
|
||||||
|
|
||||||
@commands.command(name='amongus')
|
@commands.command(name='amongus')
|
||||||
async def _amongus(self, ctx, *, map = "0"):
|
async def _amongus(self, ctx, *, map = "0"):
|
||||||
"""Affiche la carte voulue d'Among Us.\n ➡ Syntaxe: .amongus <carte>"""
|
"""Affiche la carte voulue d'Among Us.\n ➡ Syntaxe: {PREFIX}amongus <carte>"""
|
||||||
if map.lower() in self._map_list_among_us("mira"):
|
if map.lower() in self._map_list_among_us("mira"):
|
||||||
image = "https://i.imgur.com/6ijrH1h.jpg"
|
image = "https://i.imgur.com/6ijrH1h.jpg"
|
||||||
embed = discord.Embed(title = f"Map Mira HQ d'Among Us", color = discord.Colour.random(), description = f"[lien de l'image]({image})")
|
embed = discord.Embed(title = f"Map Mira HQ d'Among Us", color = discord.Colour.random(), description = f"[lien de l'image]({image})")
|
||||||
|
@ -245,7 +245,7 @@ class Utils(commands.Cog):
|
||||||
|
|
||||||
@commands.command(name='whois')
|
@commands.command(name='whois')
|
||||||
async def _whois(self, ctx, *user: discord.Member):
|
async def _whois(self, ctx, *user: discord.Member):
|
||||||
"""Affiche les infos sur l'utilisateur.\n ➡ Syntaxe: .whois [user]"""
|
"""Affiche les infos sur l'utilisateur.\n ➡ Syntaxe: {PREFIX}whois [user]"""
|
||||||
if len(user) <= 1:
|
if len(user) <= 1:
|
||||||
if user == ():
|
if user == ():
|
||||||
user = [ctx.author]
|
user = [ctx.author]
|
||||||
|
@ -357,7 +357,7 @@ class Utils(commands.Cog):
|
||||||
|
|
||||||
@commands.command(name='sondage')
|
@commands.command(name='sondage')
|
||||||
async def _sondage(self, ctx, *args):
|
async def _sondage(self, ctx, *args):
|
||||||
"""Fais un sondage.\n ➡ Syntaxe: .sondage "<Question>" "<Proposition1>" "<Proposition...>" "<Proposition20>" """
|
"""Fais un sondage.\n ➡ Syntaxe: {PREFIX}sondage "<Question>" "<Proposition1>" "<Proposition...>" "<Proposition20>" """
|
||||||
args = list(args)
|
args = list(args)
|
||||||
if len(args) > 2:
|
if len(args) > 2:
|
||||||
question = args[0]
|
question = args[0]
|
||||||
|
@ -398,7 +398,7 @@ class Utils(commands.Cog):
|
||||||
|
|
||||||
@commands.command(name='avis', aliases=['vote'])
|
@commands.command(name='avis', aliases=['vote'])
|
||||||
async def _avis(self, ctx, *args):
|
async def _avis(self, ctx, *args):
|
||||||
"""Demande un avis.\n ➡ Syntaxe: .avis/vote "[Titre]" "<Demande>" """
|
"""Demande un avis.\n ➡ Syntaxe: {PREFIX}avis/vote "[Titre]" "<Demande>" """
|
||||||
args = list(args)
|
args = list(args)
|
||||||
if len(args) > 2 or len(args) == 0:
|
if len(args) > 2 or len(args) == 0:
|
||||||
return await ctx.send("Désolé, la syntaxe est mauvaise.")
|
return await ctx.send("Désolé, la syntaxe est mauvaise.")
|
||||||
|
@ -419,7 +419,7 @@ class Utils(commands.Cog):
|
||||||
|
|
||||||
@commands.command(name='reminder', aliases=["remind", "remindme"])
|
@commands.command(name='reminder', aliases=["remind", "remindme"])
|
||||||
async def _reminder(self, ctx, time, *, reminder):
|
async def _reminder(self, ctx, time, *, reminder):
|
||||||
"""Met en place un rappel.\n ➡ Syntaxe: .reminder/remind/remindme <temps (d/h/m/s)>[@] <message> """
|
"""Met en place un rappel.\n ➡ Syntaxe: {PREFIX}reminder/remind/remindme <temps (d/h/m/s)>[@] <message> """
|
||||||
embed = discord.Embed(color = 0xC41B1B)
|
embed = discord.Embed(color = 0xC41B1B)
|
||||||
seconds = 0
|
seconds = 0
|
||||||
timestamp = datetime.utcnow()
|
timestamp = datetime.utcnow()
|
||||||
|
|
Reference in a new issue