set-welcome-msg

This commit is contained in:
2024-09-26 22:52:47 +03:00
parent cbe3e0adec
commit cca0658ce1

View File

@@ -23,8 +23,10 @@ async def handle_private(msg, state):
if text.startswith("/"): if text.startswith("/"):
if text == '/start': if text == '/start':
await telegram_api("sendMessage", chat_id=uid, text=start_message[lang]) await telegram_api("sendMessage", chat_id=uid, text=start_message[lang])
elif text.startswith('/message'): state['welcome'] = True
elif state.get('welcome'):
await edit_announce(msg) await edit_announce(msg)
state['welcome'] = False
return return
elif text.startswith('/toxic'): elif text.startswith('/toxic'):
toxic_score = await get_average_toxic(msg) toxic_score = await get_average_toxic(msg)