1
0
mirror of https://github.com/civsocit/olgram.git synced 2025-12-17 02:26:16 +00:00

add broadcasting

This commit is contained in:
arĉi
2022-10-09 20:23:45 +06:00
parent 30ab7c84b4
commit 992daa5b30
5 changed files with 93 additions and 11 deletions

View File

@@ -213,14 +213,13 @@ async def handle_operator_message(message: types.Message, super_chat_id: int, bo
async def message_handler(message: types.Message, *args, **kwargs):
_ = _get_translator(message)
bot = db_bot_instance.get()
if message.text and message.text == "/start":
# На команду start нужно ответить, не пересылая сообщение никуда
text = bot.start_text
if bot.enable_olgram_text:
text += _(ServerSettings.append_text())
text += ServerSettings.append_text(_get_translator(message))
return SendMessage(chat_id=message.chat.id, text=text, parse_mode="HTML")
if message.text and message.text == "/security_policy":