S
S
szjyakgf2021-12-04 12:56:11
Python
szjyakgf, 2021-12-04 12:56:11

How to mute, ban telegrams with a bot?

I roughly figured out how to add the /ban command to the bot:

@dp.message_handler(commands=['ban'])
async def ban(message: types.Message):
    await message.bot.ban_chat_member(message.chat.id, message.reply_to_message.from_user.id)

But how can a user be given a mute for 5 hours by issuing the /mute 5 command?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
alexbprofit, 2021-12-04
@szjyakgf

Answer:
https://stackoverflow.com/questions/41521266/dont-...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question