From 268573922cc49184da96b944b6ec6356132492a6 Mon Sep 17 00:00:00 2001 From: Bella | Nightshade Date: Sat, 2 Mar 2019 04:11:37 +0930 Subject: [PATCH] Send system json file in DMs instead of publicly --- src/pluralkit/bot/__init__.py | 2 +- src/pluralkit/bot/commands/__init__.py | 4 ++-- src/pluralkit/bot/commands/misc_commands.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/pluralkit/bot/__init__.py b/src/pluralkit/bot/__init__.py index 042c8497..6f7d4edd 100644 --- a/src/pluralkit/bot/__init__.py +++ b/src/pluralkit/bot/__init__.py @@ -61,7 +61,7 @@ def run(): print("{} servers".format(len(client.guilds))) print("{} shards".format(client.shard_count or 1)) - await client.change_presence(activity=discord.Game(name="pk;help")) + await client.change_presence(activity=discord.Game(name="kek;help")) @client.event async def on_message(message: discord.Message): diff --git a/src/pluralkit/bot/commands/__init__.py b/src/pluralkit/bot/commands/__init__.py index 8e15c177..117ecb6c 100644 --- a/src/pluralkit/bot/commands/__init__.py +++ b/src/pluralkit/bot/commands/__init__.py @@ -14,7 +14,7 @@ from pluralkit.system import System def next_arg(arg_string: str) -> Tuple[str, Optional[str]]: # A basic quoted-arg parser - + for quote in "“‟”": arg_string = arg_string.replace(quote, "\"") @@ -211,7 +211,7 @@ async def run_command(ctx: CommandContext, func): async def command_dispatch(client: discord.Client, message: discord.Message, conn) -> bool: - prefix = "^(pk(;|!)|<@{}> )".format(client.user.id) + prefix = "^(kek(;|!)|<@{}> )".format(client.user.id) regex = re.compile(prefix, re.IGNORECASE) cmd = message.content diff --git a/src/pluralkit/bot/commands/misc_commands.py b/src/pluralkit/bot/commands/misc_commands.py index ee28836c..07960491 100644 --- a/src/pluralkit/bot/commands/misc_commands.py +++ b/src/pluralkit/bot/commands/misc_commands.py @@ -53,7 +53,7 @@ async def invite_link(ctx: CommandContext): async def export(ctx: CommandContext): working_msg = await ctx.message.channel.send("Working...") - + system = await ctx.ensure_system() members = await system.get_members(ctx.conn) @@ -94,7 +94,7 @@ async def export(ctx: CommandContext): await working_msg.delete() f = io.BytesIO(json.dumps(data).encode("utf-8")) - await ctx.message.channel.send(content="Here you go!", file=discord.File(fp=f, filename="pluralkit_system.json")) + await ctx.message.author.send(content="Here you go!", file=discord.File(fp=f, filename="pluralkit_system.json")) async def tell(ctx: CommandContext):