[V3 Core] Add [p]helpset (#1694)

* Add settings and commands for page and character limits

* Add missing returns

* Consistent responses
This commit is contained in:
Tobotimus
2018-05-23 15:04:53 +10:00
committed by palmtree5
parent 889acaec82
commit 099fe59a97
3 changed files with 52 additions and 2 deletions

View File

@@ -236,7 +236,9 @@ class Help(formatter.HelpFormatter):
emb["embed"]["title"] = "{0}".format(reason)
ret = []
field_groups = self.group_fields(emb["fields"])
page_char_limit = await ctx.bot.db.help.page_char_limit()
field_groups = self.group_fields(emb["fields"], page_char_limit)
for i, group in enumerate(field_groups, 1):
embed = discord.Embed(color=self.color, **emb["embed"])
@@ -360,7 +362,8 @@ async def help(ctx, *cmds: str):
else:
embeds = await f.format_help_for(ctx, command)
if len(embeds) > 2:
max_pages_in_guild = await ctx.bot.db.help.max_pages_in_guild()
if len(embeds) > max_pages_in_guild:
destination = ctx.author
for embed in embeds: