From e2257b4fb5abe715ac1a374e35b4406be72d798e Mon Sep 17 00:00:00 2001 From: Guillermo Rodriguez Date: Sat, 24 Dec 2022 12:11:57 -0300 Subject: [PATCH] Disable private msging with skynet --- skynet/frontend/telegram.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/skynet/frontend/telegram.py b/skynet/frontend/telegram.py index 82196e0..83fe912 100644 --- a/skynet/frontend/telegram.py +++ b/skynet/frontend/telegram.py @@ -82,6 +82,10 @@ async def run_skynet_telegram( @bot.message_handler(commands=['txt2img']) async def send_txt2img(message): + chat = message.chat + if chat.type != 'group' and chat.id != GROUP_ID: + return + prompt = ' '.join(message.text.split(' ')[1:]) if len(prompt) == 0: @@ -122,6 +126,10 @@ async def run_skynet_telegram( @bot.message_handler(commands=['redo']) async def redo_txt2img(message): + chat = message.chat + if chat.type != 'group' and chat.id != GROUP_ID: + return + resp = await _rpc_call(message.from_user.id, 'redo') resp_txt = ''