[mod-help] Fix des oublis
This commit is contained in:
parent
08d9998f73
commit
4c5820b19e
@ -33,9 +33,6 @@ class BaseClass:
|
|||||||
"authorized_users": [], "command_text": self.name.lower()})
|
"authorized_users": [], "command_text": self.name.lower()})
|
||||||
|
|
||||||
async def send_help(self, channel):
|
async def send_help(self, channel):
|
||||||
if not self.config.help_active:
|
|
||||||
return
|
|
||||||
|
|
||||||
embed = discord.Embed(
|
embed = discord.Embed(
|
||||||
title="[{nom}] - Aide".format(nom=self.name),
|
title="[{nom}] - Aide".format(nom=self.name),
|
||||||
description="*" + self.help["description"].format(prefix=self.client.config['prefix']) + "*",
|
description="*" + self.help["description"].format(prefix=self.client.config['prefix']) + "*",
|
||||||
|
@ -17,7 +17,7 @@ class MainClass(BaseClassPython):
|
|||||||
async def com_list(self, message, args, kwargs):
|
async def com_list(self, message, args, kwargs):
|
||||||
embed = discord.Embed(title="[Aide] - Liste des modules", color=self.config.color)
|
embed = discord.Embed(title="[Aide] - Liste des modules", color=self.config.color)
|
||||||
for moduleName in list(self.client.modules.keys()):
|
for moduleName in list(self.client.modules.keys()):
|
||||||
if self.client.modules[moduleName]["initialized_class"].help_active:
|
if self.client.modules[moduleName]["initialized_class"].config.help_active:
|
||||||
embed.add_field(
|
embed.add_field(
|
||||||
name=moduleName.capitalize(),
|
name=moduleName.capitalize(),
|
||||||
value=self.client.modules[moduleName]["initialized_class"].help["description"])
|
value=self.client.modules[moduleName]["initialized_class"].help["description"])
|
||||||
@ -28,7 +28,8 @@ class MainClass(BaseClassPython):
|
|||||||
# await module["initialized_class"].send_help(message.channel)
|
# await module["initialized_class"].send_help(message.channel)
|
||||||
|
|
||||||
async def command(self, message, args, kwargs):
|
async def command(self, message, args, kwargs):
|
||||||
if len(args) and args[0] in self.client.modules.keys():
|
if len(args) and args[0] in self.client.modules.keys() and self.client.modules[args[0]][
|
||||||
|
"initialized_class"].config.help_active:
|
||||||
await self.client.modules[args[0]]["initialized_class"].send_help(message.channel)
|
await self.client.modules[args[0]]["initialized_class"].send_help(message.channel)
|
||||||
else :
|
else :
|
||||||
await self.send_help(message.channel)
|
await self.send_help(message.channel)
|
Loading…
Reference in New Issue
Block a user