[V3 Help] Convert help command to support embeds (#1106)

* Replace built in help with embedded help

* Make embeds pagify

* Fix thingy

* Fix missing embed permissions
This commit is contained in:
Will
2017-11-26 20:04:26 -05:00
committed by GitHub
parent 09ed5e67a6
commit 064e9b6bd0
3 changed files with 357 additions and 4 deletions

View File

@@ -33,10 +33,17 @@ class RedContext(commands.Context):
"""
command = self.invoked_subcommand or self.command
pages = await self.bot.formatter.format_help_for(self, command)
embeds = await self.bot.formatter.format_help_for(self, command)
destination = self
ret = []
for page in pages:
ret.append(await self.send(page))
for embed in embeds:
try:
m = await destination.send(embed=embed)
except discord.HTTPException:
destination = self.author
m = await destination.send(embed=embed)
ret.append(m)
return ret
async def tick(self) -> bool: