mirror of https://github.com/skygpu/skynet.git
Disable private msging with skynet
parent
ce5d847565
commit
e2257b4fb5
|
@ -82,6 +82,10 @@ async def run_skynet_telegram(
|
||||||
|
|
||||||
@bot.message_handler(commands=['txt2img'])
|
@bot.message_handler(commands=['txt2img'])
|
||||||
async def send_txt2img(message):
|
async def send_txt2img(message):
|
||||||
|
chat = message.chat
|
||||||
|
if chat.type != 'group' and chat.id != GROUP_ID:
|
||||||
|
return
|
||||||
|
|
||||||
prompt = ' '.join(message.text.split(' ')[1:])
|
prompt = ' '.join(message.text.split(' ')[1:])
|
||||||
|
|
||||||
if len(prompt) == 0:
|
if len(prompt) == 0:
|
||||||
|
@ -122,6 +126,10 @@ async def run_skynet_telegram(
|
||||||
|
|
||||||
@bot.message_handler(commands=['redo'])
|
@bot.message_handler(commands=['redo'])
|
||||||
async def redo_txt2img(message):
|
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 = await _rpc_call(message.from_user.id, 'redo')
|
||||||
|
|
||||||
resp_txt = ''
|
resp_txt = ''
|
||||||
|
|
Loading…
Reference in New Issue