mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-13 17:20:14 +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
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue