From 9350f4cc18d6363d3e7f53e39809b92730e4df41 Mon Sep 17 00:00:00 2001 From: Ske Date: Sun, 15 Jul 2018 21:11:41 +0200 Subject: [PATCH] Don't proxy in DMs --- bot/pluralkit/proxy.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bot/pluralkit/proxy.py b/bot/pluralkit/proxy.py index aef6f7b8..c4a287c8 100644 --- a/bot/pluralkit/proxy.py +++ b/bot/pluralkit/proxy.py @@ -135,6 +135,10 @@ async def proxy_message(conn, member, trigger_message, inner): async def handle_proxying(conn, message): + # Can't proxy in DMs, webhook creation will explode + if message.channel.is_private: + return False + # Big fat query to find every member associated with this account # Returned member object has a few more keys (system tag, for example) members = await db.get_members_by_account(conn, account_id=message.author.id)