format help strings
This commit is contained in:
parent
73e5a227a5
commit
34183adcfb
@ -703,23 +703,25 @@ class Utils:
|
|||||||
@commands.cooldown(1, 5, commands.BucketType.user)
|
@commands.cooldown(1, 5, commands.BucketType.user)
|
||||||
async def custom_help(self, ctx, command: str=None):
|
async def custom_help(self, ctx, command: str=None):
|
||||||
pag = utils.Paginator(self.bot, embed=True, max_line_length=44)
|
pag = utils.Paginator(self.bot, embed=True, max_line_length=44)
|
||||||
msg = await ctx.send('Loading Help...')
|
if command is None:
|
||||||
pag.add('\uFFF6My new help\nTest message\n\uFFF7\n\uFFF8')
|
pag.add('\uFFF6My new help\nTest message\n\uFFF7\n\uFFF8')
|
||||||
for cog in self.bot.cogs:
|
for cog in self.bot.cogs:
|
||||||
for command in self.bot.get_cog_commands(cog):
|
for command in self.bot.get_cog_commands(cog):
|
||||||
if not command.hidden:
|
if not command.hidden:
|
||||||
pag.add(f'\uFFF6{command.name}')
|
pag.add(f'\uFFF6{command.name}')
|
||||||
pag.add(f'{command.short_doc}', truncate=True)
|
pag.add(f'> {command.short_doc}', truncate=True)
|
||||||
try:
|
try:
|
||||||
for com in command.commands:
|
for com in command.commands:
|
||||||
if not com.hidden:
|
if not com.hidden:
|
||||||
pag.add(f'{com.name}')
|
pag.add(f'# {com.name}')
|
||||||
|
pag.add(f'> {com.short_doc}', truncate=True)
|
||||||
except AttributeError as e:
|
except AttributeError as e:
|
||||||
pass
|
pass
|
||||||
pag.add('\uFFF7')
|
pag.add('\uFFF7')
|
||||||
pag.add('\uFFF8')
|
pag.add('\uFFF8')
|
||||||
book = utils.Book(pag, (msg, ctx.channel, self.bot, ctx.message))
|
book = utils.Book(pag, (None, ctx.channel, self.bot, ctx.message))
|
||||||
await book.create_book()
|
await book.create_book()
|
||||||
|
|
||||||
|
|
||||||
def setup(bot):
|
def setup(bot):
|
||||||
bot.add_cog(Utils(bot))
|
bot.add_cog(Utils(bot))
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user