mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-15 10:10:12 +00:00
Refactor error handling slightly and don't use embeds for basic status/error messages. Closes #28.
This commit is contained in:
parent
869f686bd5
commit
8e504fa879
11 changed files with 74 additions and 81 deletions
|
|
@ -21,7 +21,7 @@ async def message_info(ctx: CommandContext):
|
|||
try:
|
||||
mid = int(mid_str)
|
||||
except ValueError:
|
||||
return CommandError("You must pass a valid number as a message ID.", help=help.message_lookup)
|
||||
raise CommandError("You must pass a valid number as a message ID.", help=help.message_lookup)
|
||||
|
||||
# Find the message in the DB
|
||||
message = await db.get_message(ctx.conn, mid)
|
||||
|
|
@ -59,4 +59,4 @@ async def message_info(ctx: CommandContext):
|
|||
|
||||
embed.set_author(name=message.name, icon_url=message.avatar_url or discord.Embed.Empty)
|
||||
|
||||
await ctx.reply(embed=embed)
|
||||
await ctx.reply_ok(embed=embed)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue