mirror of
				https://gitlab.com/ddorn/tfjm-discord-bot.git
				synced 2025-10-31 00:19:52 +01:00 
			
		
		
		
	✨ help for a command
This commit is contained in:
		| @@ -53,20 +53,8 @@ class MiscCog(Cog, name="Divers"): | ||||
|  | ||||
|         if not args: | ||||
|             await self.send_bot_help(ctx) | ||||
|             return | ||||
|         else: | ||||
|             pass | ||||
|  | ||||
|         embed = discord.Embed( | ||||
|             title="Help for `!draw`", | ||||
|             description="Groupe qui continent des commande pour les tirages", | ||||
|             color=0xFFA500, | ||||
|         ) | ||||
|         # embed.set_author(name="*oooo*") | ||||
|         embed.add_field(name="zoulou", value="okokok", inline=True) | ||||
|         embed.add_field(name="lklk", value="mnmn", inline=True) | ||||
|         embed.set_footer(text="thankss!") | ||||
|         await ctx.send(embed=embed) | ||||
|             await self.send_command_help(ctx, args) | ||||
|  | ||||
|     async def send_bot_help(self, ctx: Context): | ||||
|         embed = discord.Embed( | ||||
| @@ -107,6 +95,34 @@ class MiscCog(Cog, name="Divers"): | ||||
|  | ||||
|         await ctx.send(embed=embed) | ||||
|  | ||||
|     async def send_command_help(self, ctx, args): | ||||
|         name = " ".join(args) | ||||
|         comm: Command = self.bot.get_command(name) | ||||
|         if comm is None: | ||||
|             await ctx.send( | ||||
|                 f"La commande `!{name}` n'existe pas. " | ||||
|                 f"Utilise `!help` pour une liste des commandes." | ||||
|             ) | ||||
|             return | ||||
|  | ||||
|         embed = discord.Embed( | ||||
|             title=f"Aide pour la commande `!{comm.qualified_name}`", | ||||
|             description=comm.help, | ||||
|             color=0xFFA500, | ||||
|         ) | ||||
|  | ||||
|         # embed.set_author(name="*oooo*") | ||||
|         if comm.aliases: | ||||
|             aliases = ", ".join(f"`{a}`" for a in comm.aliases) | ||||
|             embed.add_field(name="Alias", value=aliases, inline=True) | ||||
|         if comm.signature: | ||||
|             embed.add_field( | ||||
|                 name="Usage", value=f"`!{comm.qualified_name} {comm.signature}`" | ||||
|             ) | ||||
|         embed.set_footer(text="Suggestion ? Problème ? Envoie un message à @Diego") | ||||
|  | ||||
|         await ctx.send(embed=embed) | ||||
|  | ||||
|     def _name(self, command: Command): | ||||
|         return f"`!{command.qualified_name}`" | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user