Add mute message

This commit is contained in:
Maxim Khomutov 2022-06-27 20:25:51 +03:00
parent 03f76ddd1d
commit f7d232c20b

View File

@ -128,6 +128,9 @@ async def mute(msg: types.Message):
c += int(word[:len(word) - 1]) c += int(word[:len(word) - 1])
tools.set_mute(user_id, c) tools.set_mute(user_id, c)
await tools.set_user_permissions(user_id, msg.chat.id, mute_perm) await tools.set_user_permissions(user_id, msg.chat.id, mute_perm)
await msg.reply(
f"""<a href="tg://user?id={user_id}">Пользователь</a> будет молчать до <code>{c}</code>""" +
"секунды по UnixTime.", parse_mode=ParseMode.HTML)
except Exception as e: except Exception as e:
await msg.reply(f"Exception: <code>{e}</code>", parse_mode=ParseMode.HTML) await msg.reply(f"Exception: <code>{e}</code>", parse_mode=ParseMode.HTML)
else: else:
@ -182,7 +185,7 @@ async def set_hello_message(msg: types.Message):
hello = err = None hello = err = None
if mode in ("default", "standart"): if mode in ("default", "standart"):
hello = config.standart_start_message hello = config.standard_start_message
elif mode == "new": elif mode == "new":
if len(splt) > 2: if len(splt) > 2:
hello = " ".join(splt[2:]) hello = " ".join(splt[2:])