Answer the question
In order to leave comments, you need to log in
How to remove the inscription, are you subscribed to this channel?
Tell me how to delete the system entry, are you subscribed to this channel?
For a group, the bot has the following:
@dp.message_handler(content_types=['new_chat_members'])
async def on_user_joined(message: types.Message):
print("JOIN message removed")
await message.delete()
@dp.message_handler(content_types=['new_channel_members'])
async def on_user_joined(message: types.Message):
await bot.delete_message(message.chat.id, message.message_id)
await can_delete_messages()
await message.delete()
Answer the question
In order to leave comments, you need to log in
This message exists only for the user, so the bot cannot delete it, and it does not have any ID.
Perhaps you need to play around with the rights of the bot in this channel. For a group, he must be an administrator, maybe there are some roles for the channel too.
Where did you even get new_channel_members from ? From what documentation? There is no such thing in aiogram, it won't work.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question