From 5585984192d8328dbcc2bab0c37130b27a20733f Mon Sep 17 00:00:00 2001 From: Suwako Moriya Date: Wed, 1 Apr 2020 12:39:40 +0200 Subject: [PATCH] [base] Added "/module help" by default --- modules/base/Base.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/base/Base.py b/modules/base/Base.py index 32269d0..508e227 100644 --- a/modules/base/Base.py +++ b/modules/base/Base.py @@ -37,6 +37,9 @@ class BaseClass: self.config.init({"authorized_roles": self.authorized_roles, "authorized_users": self.authorized_users}) async def send_help(self, channel): + if not self.help_active: + return + embed = discord.Embed( title="[{nom}] - Aide".format(nom=self.name), description=self.help["description"].format(prefix=self.client.config['prefix']), @@ -165,6 +168,9 @@ class BaseClass: Function which is executed for all command_text doesn't match with a `com_{subcommand}` function""" pass + async def com_help(self, message, args, kwargs): + await self.send_help(message.channel) + async def unauthorized(self, message): await message.channel.send("Vous n'êtes pas autorisé à effectuer cette commande")