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

there are no errors. network issues are caused by your system or Telegram

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

Telethon Chat

/channel/TelethonChat/583482

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

Telethon Chat

Hello, can someone tell me what is the output of this code?

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

Telethon Chat

What's error anyone help

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

Telethon Chat

Is there any way to find out using a telethon?

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

Telethon Chat

I have not engaged in spam behavior
I just wanted to import contacts or import user information by phone number

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

Telethon Chat

you will get limits if you spam on it

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

Telethon Chat

there is a new format
t . me / + 1 2 3 4 5

You can try that, no rate limit. But the downside is that it only gives good results if the user has the "who can find me by number" set to "everyone"

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

Telethon Chat

Telethon is free software. That means using it is a right: you are free to use it for absolutely any purpose whatsoever. However, help and support with using it is a privilege. If you misbehave or want to do bad things, despite possibly having good intentions, nobody is obligated to help you.

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

Telethon Chat

Does anyone know a quick way to import contact or get user information from thousands of phone numbers?
ImportContactRequest or ResolvePhone gives me contact limitations
Does anyone know of another way?

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

Telethon Chat

Can anyone explain how to distinguish a message is edited or reacted in telethon

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

Telethon Chat

from html import escape as FIX

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

Telethon Chat

e e
I wrote the following function to transform my text but I only get literal < etc..

def html_fix(text):
text = text.replace('<', '&lt;')
text = text.replace('>', '&gt;')
text = text.replace('&', '&amp;')
return text

async def main():
await client.start()

original_text = "<example> & <test>"
fixed_text = html_fix(original_text)
message = f"<pre>\n{fixed_text}\n</pre>"

await client.send_message('username_or_chat_id', message, parse_mode='html')

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

Telethon Chat

from telethon import TelegramClient, events

api_id = 'YOUR_API_ID'
api_hash = 'YOUR_API_HASH'

client = TelegramClient('session_name', api_id, api_hash)

async def main():
await client.start()

message = """<pre>
&lt;example&gt;
&lt;div&gt;Это пример HTML-кода&lt;/div&gt;
</pre>"""

await client.send_message('username_or_chat_id', message, parse_mode='html')

with client:
client.loop.run_until_complete(main())

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

Telethon Chat

this library is already installed, but it didn't help in any way.

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

Telethon Chat

/channel/TelethonChat/637234

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

Telethon Chat

That is not related to Telethon. Please move to a different group with the correct topic to continue that conversation

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

Telethon Chat

Anyone who knows, please help me

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

Telethon Chat

client = TelegramClient('userbot', API_ID, API_HASH)


async def main():
try:
logger.info("Connecting to Telegram...")
await client.connect()

if not await client.is_user_authorized():
logger.info("User not authorized. Sending code request...")
await client.send_code_request(PHONE_NUMBER)
code = input("Enter the code sent to your Telegram: ").strip()
await client.sign_in(PHONE_NUMBER, code)
logger.info("Signed in successfully!")

logger.info("Telegram client is running. Press Ctrl+C to stop.")
await client.run_until_disconnected()

except Exception as e:
logger.error(f"An error occurred: {e}")
await client.disconnect()


if name == 'main':
asyncio.run(main())

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

Telethon Chat

Which tips do you need 💡

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

Telethon Chat

Thank you, I wish I could send you a coffee.
Can you share more tips?

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

Telethon Chat

No, totally independent. Probably the best with playwright

Ask ChatGPT or BingAI.

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

Telethon Chat

Yes. So is there anyone who can help? 😞

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

Telethon Chat

I haven't figured it out in a year

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

Telethon Chat

Stuck with it from morning

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

Telethon Chat

from telethon import TelegramClient
from html import escape as FIX

api_id = 'YOUR_API_ID'
api_hash = 'YOUR_API_HASH'
client = TelegramClient('session_name', api_id, api_hash)

async def main():
await client.start()

original_text = "<example> & <test>"
fixed_text = FIX(original_text)
message = f"<pre>\n{fixed_text}\n</pre>"

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

Telethon Chat

so it doesn't have to be uppercase HTML huh

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

Telethon Chat

buying premium subscription would help. with other ways you'll encounter flood wait error sooner or later, but this might help:
https://gist.github.com/painor/7e74de80ae0c819d3e9abcf9989a8dd6

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

Telethon Chat

I looked at my proxies, which are very good and have good bandwidth.

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

Telethon Chat

how can I send literal < and > inside an HTML message inside <pre></pre> tags?

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