Official Telethon's chat! Rules: • Speak English • Stay on topic (questions about Telethon) • Be respectful • Don't ask to ask • Spam-related uses lead to ban • Read https://docs.telethon.dev before asking things here Read more about us @TelethonUpdates
You use kick_participant if it's a Chat aka small group, otherwise edit_permissions with view_messages=False
Читать полностью…Kick is ban for small groups, it's ban + unban for channel/supergroup only
Читать полностью…i didn't update telethon and i didn't change my code
telegram fixed codeblock problem, now works without make custom markdown.
I also removed @ from the bot link, but it didn’t help
Читать полностью…event its a multitheards
if working, and he doesnt want write to bot from link and get link from button
Well yeah, why wouldn't they
if you need for only pattern one to run, you have to raise telethon.events.StopPropagation
in get_chat_id, or pass inverted pattern to my_event_function
Okey, it`s very strangely, but it works. But, it`s working both func again....
Читать полностью…client telethon and the first bot with whom there is no correspondence
Читать полностью…It's not possible to tell with this much code. remove the pattern and see if print is reached
Читать полностью…add a debugging print to first line of get_chat_id, see if it's getting called
Читать полностью…So, Can I use client.kick_participant for ban user? From small groups\channels\supergroups?
Читать полностью…How can I ban user in groups and channel? I`ve found client.edit_permissions, but this method is valid only for channels or supergroups. I`ve found client.kick_participant method, but this only kick user, no ban
Читать полностью…what sort of.. include errors if any or try to debug it and see whether the "if" condition is reached at all
Читать полностью…I tried to send a message to a bot that is in the correspondence and it sent it a message, but the bot is not in the dialogues, it just doesn’t want to send a message
Читать полностью…Hi and welcome to the group. Before asking any questions, please read the rules from the group's description, and don't forget to read the docs. Make sure you are using the latest version with pip3 install -U telethon
, since most problems have already been fixed in newer versions.
idk, but it works. Thank you very match! You`re the best!
Читать полностью…get_chat_id and my_event_function work together by 1 event
Читать полностью…You're sending a wrong message then, if pattern fails
make sure it isn't capitalized
I`ve tried to put get_chat_id fund under my_event_handler, but it`s no effect too
Читать полностью…a small groups / Chat isn't a channel/supergroup. you can't construct InputChannel for it. if you need to use that request on it, you have to upgrade it to supergroup
Читать полностью…