telethonchat | Unsorted

Telegram-канал telethonchat - Telethon Chat

6097

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

Subscribe to a channel

Telethon Chat

So, should I get reply or get response? And open it in the comments?

Читать полностью…

Telethon Chat

you can, same as usual Telegram apps. only the account fetching the comment can send_message to it

Читать полностью…

Telethon Chat

Anyone who speaks in the comments

Читать полностью…

Telethon Chat

Can I open a conversation?

Читать полностью…

Telethon Chat

How to deply the userbot as it asks code for authentication ?

Читать полностью…

Telethon Chat

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.

Читать полностью…

Telethon Chat

TL Reference for EditTitle

Читать полностью…

Telethon Chat

unless you set multiple different handlers to trigger on addition, a func is useless. code usually, see beginning of /channel/TelethonChat/611007

Читать полностью…

Telethon Chat

Try that out then you will know that it will work or not

Читать полностью…

Telethon Chat

But it also might to handle also when your client adds somebody else , then you can simply filter the adder

Читать полностью…

Telethon Chat

Outgoing include actions from host of your client
Incoming is on the otherside for other accounts

Читать полностью…

Telethon Chat

Or you can simply set outgoing=True and then use lambda e : e.user_added as func in the decorator

Читать полностью…

Telethon Chat

lambda event : event.out and event.user_added

I think

Читать полностью…

Telethon Chat

you can automate the process by calling parse with markdown and unparse with html

Читать полностью…

Telethon Chat

So when bot gets added, the ChatAction event user_added is True and user_joined is False, right? And how do I filter it using a func so I only catch events where my bot was added? Should I do like func=lambda e: e.user_id == my_bot_id or my_bot_id in e.user_ids ?

Читать полностью…

Telethon Chat

I get the channel ID using KeyboardButtonRequestPeer, but this ID is without -100

Читать полностью…

Telethon Chat

what made you think that

Читать полностью…

Telethon Chat

most common way is using a string session

Читать полностью…

Telethon Chat

It is not possible to get peer id through id?

Читать полностью…

Telethon Chat

if this is all of your code, show the full traceback

Читать полностью…

Telethon Chat

And can I use func=lambda e: client.id in e.user_ids as suggested above, or e.user_ids may be not populated? (and I have to call get_input_users())

Читать полностью…

Telethon Chat

I'm trying to use EditChatTitleRequest, but:

Error: Invalid object ID for a chat. Make sure to pass the right types, for instance making sure that the request is designed for chats (not channels/megagroups) or otherwise look for a different one more suited
An example working with a megagroup and AddChatUserRequest, it will fail because megagroups are channels. Use InviteToChannelRequest instead (caused by EditChatTitleRequest)


How ever it's a mega group and I passed the chat id like -1001231231231

Читать полностью…

Telethon Chat

func = lambda event : event.user_added and event.user_joined and client.id in event.user_ids

If didn't work...

Читать полностью…

Telethon Chat

According to the docs, e.outgoing is only mentioned on a NewMessage event, not ChatAction

Читать полностью…

Telethon Chat

So when someone adds my bot to a group - that is an outgoing event for my bot, right?

Читать полностью…

Telethon Chat

What's out? outgoing?
Wouldn't that catch all "user_added" events? I need only those, which is about my self (my bot)

Читать полностью…

Telethon Chat

from telethon.extensions.markdown import parse
from telethon.extensions.html import unparse
print(unparse(*parse(original_text)))

Читать полностью…

Telethon Chat

Any document or example ?

Читать полностью…

Telethon Chat

I wrote all of text strings of my bot with Markdown parse mode symptoms and now I should re-write them all with HTML signs._.

Читать полностью…

Telethon Chat

I'm trying edit admin , title = ...
but fail

Читать полностью…
Subscribe to a channel