Refactor error handling slightly and don't use embeds for basic status/error messages. Closes #28.

This commit is contained in:
Ske
2018-11-15 21:05:13 +01:00
parent 869f686bd5
commit 8e504fa879
11 changed files with 74 additions and 81 deletions

View File

@@ -28,7 +28,7 @@ async def show_help(ctx: CommandContext):
else:
embed.description = text
else:
return CommandError("Unknown help page '{}'.".format(category))
raise CommandError("Unknown help page '{}'.".format(category))
await ctx.reply(embed=embed)
@@ -47,7 +47,7 @@ async def invite_link(ctx: CommandContext):
url = oauth_url(client_id, permissions)
logger.debug("Sending invite URL: {}".format(url))
return CommandSuccess("Use this link to add PluralKit to your server: {}".format(url))
await ctx.reply_ok("Use this link to add PluralKit to your server: {}".format(url))
async def export(ctx: CommandContext):