Answer the question
In order to leave comments, you need to log in
An error in the code. Python, aigram?
An error in the code. Python, aigram. It turns out here is such an error (attached file), how to fix it?
Here is the same code:
@dp.message_handler(is_admin=True, commands=["unmute","унмут"],commands_prefix="!/")
async def cmd_unmute(message: types.Message):
if not message.reply_to_message:
await message.reply("Эта команда должна быть ответом на сообщение!")
return
await bot.restrict_chat_member(message.chat.id, message.reply_to_message.from_user.id,ChatPermissions(
can_send_messages=True,
can_send_media_messages=True,
can_send_other_messages=True,
can_add_web_page_previews=True))
Answer the question
In order to leave comments, you need to log in
Somewhere spaces were used, somewhere tabs were used as indents, replace everything with one thing
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question