-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCustomHelpCommand.py
More file actions
27 lines (20 loc) · 978 Bytes
/
CustomHelpCommand.py
File metadata and controls
27 lines (20 loc) · 978 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
from discord import Embed
from discord.ext import commands
from discord.colour import Colour
from Utils.JsonHandler import settings, message_texts
class CustomHelpCommand(commands.HelpCommand):
def __init__(self):
super().__init__()
lang = message_texts['help']
async def send_bot_help(self, mapping):
embed = Embed(title="Help", colour=Colour.red())
for cog, lst_of_commands in mapping.items():
for command in lst_of_commands:
embed.add_field(name=f"{settings['prefix']}{command.name}", value=self.lang[command.name], inline=False)
channel = self.get_destination()
await channel.send(embed=embed)
async def send_command_help(self, command):
embed = Embed(title="Command help", colour=Colour.red())
embed.add_field(name=f"{settings['prefix']}{command.name}", value=self.lang[command.name])
channel = self.get_destination()
await channel.send(embed=embed)