mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-11 08:10:10 +00:00
Add a super sneaky dev debug messaging command
This commit is contained in:
parent
3382ca2862
commit
ef7fc4397a
2 changed files with 17 additions and 0 deletions
|
|
@ -181,6 +181,8 @@ async def command_root(ctx: CommandContext):
|
||||||
await import_commands.import_root(ctx)
|
await import_commands.import_root(ctx)
|
||||||
elif ctx.match("help"):
|
elif ctx.match("help"):
|
||||||
await misc_commands.help_root(ctx)
|
await misc_commands.help_root(ctx)
|
||||||
|
elif ctx.match("tell"):
|
||||||
|
await misc_commands.tell(ctx)
|
||||||
else:
|
else:
|
||||||
raise CommandError("Unknown command {}. For a list of commands, type `pk;help commands`.".format(ctx.pop_str()))
|
raise CommandError("Unknown command {}. For a list of commands, type `pk;help commands`.".format(ctx.pop_str()))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -90,3 +90,18 @@ async def export(ctx: CommandContext):
|
||||||
|
|
||||||
f = io.BytesIO(json.dumps(data).encode("utf-8"))
|
f = io.BytesIO(json.dumps(data).encode("utf-8"))
|
||||||
await ctx.message.channel.send(content="Here you go!", file=discord.File(fp=f, filename="system.json"))
|
await ctx.message.channel.send(content="Here you go!", file=discord.File(fp=f, filename="system.json"))
|
||||||
|
|
||||||
|
|
||||||
|
async def tell(ctx: CommandContext):
|
||||||
|
# Dev command only
|
||||||
|
# This is used to tell members of servers I'm not in when something is broken so they can contact me with debug info
|
||||||
|
if ctx.message.author.id != 102083498529026048:
|
||||||
|
# Just silently fail, not really a public use command
|
||||||
|
return
|
||||||
|
|
||||||
|
channel = ctx.pop_str()
|
||||||
|
message = ctx.remaining()
|
||||||
|
|
||||||
|
# lol error handling
|
||||||
|
await ctx.client.get_channel(int(channel)).send(content="[dev message] " + message)
|
||||||
|
await ctx.reply_ok("Sent!")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue