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

@@ -1,7 +1,7 @@
import logging
from discord import DMChannel
from pluralkit.bot.commands import CommandContext, CommandSuccess
from pluralkit.bot.commands import CommandContext
logger = logging.getLogger("pluralkit.commands")
disclaimer = "Please note that this grants access to modify (and delete!) all your system data, so keep it safe and secure. If it leaks or you need a new one, you can invalidate this one with `pk;token refresh`."
@@ -10,7 +10,7 @@ async def reply_dm(ctx: CommandContext, message: str):
await ctx.message.author.send(message)
if not isinstance(ctx.message.channel, DMChannel):
return CommandSuccess("DM'd!")
await ctx.reply_ok("DM'd!")
async def get_token(ctx: CommandContext):
system = await ctx.ensure_system()