mirror of
https://github.com/SantaSpeen/RoyaltyIT-tg-bot.git
synced 2026-10-26 14:00:02 +00:00
set_hello_mesasage fixes
This commit is contained in:
1 parent
1a52aaeb41
commit
889d3ee297
1 file changed
+5
-3
+5
-3
@@ -162,16 +162,18 @@ async def ban(msg: types.Message):
|
|||||||
|
|
||||||
|
|
||||||
@dp.message_handler(regexp=r"\A(?:.|\/)set", is_chat_admin=True)
|
@dp.message_handler(regexp=r"\A(?:.|\/)set", is_chat_admin=True)
|
||||||
def set_hello_mesasage(msg: types.Message):
|
async def set_hello_mesasage(msg: types.Message):
|
||||||
text = msg.text
|
text = msg.text
|
||||||
splt = text.split(" ")
|
splt = text.split(" ")
|
||||||
if len(splt) > 1:
|
if len(splt) > 1:
|
||||||
|
|
||||||
config.new_member_message = splt[1:]
|
config.new_member_message = " ".join(splt[1:])
|
||||||
|
await msg.reply("Теперь приветсвенное сообщение будет такое:")
|
||||||
|
await bot.send_message(msg.chat.id, config.new_member_message)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|
||||||
msg.reply("`/set [hello message]`", parse_mode=ParseMode.MARKDOWN)
|
await msg.reply("`/set [hello message]`", parse_mode=ParseMode.MARKDOWN)
|
||||||
|
|
||||||
|
|
||||||
@dp.message_handler(content_types=['new_chat_members'], chat_type=ChatType.SUPERGROUP)
|
@dp.message_handler(content_types=['new_chat_members'], chat_type=ChatType.SUPERGROUP)
|
||||||
|
|||||||
Reference in new issue
Block a user