telethonchat | Unsorted

Telegram-канал telethonchat - Telethon Chat

6095

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

Won't get_dialogs be automatically cached in the session file?

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

Telethon Chat

await client.get_dialogs()
send_search = SendSearch(client, user_id)

Why can I send messages directly after using get_dialogs, but when I delete get_dialogs, messages reappear in the same session file?

ValueError: Could not find the input entity for PeerUser(user_id=5367191641) (PeerUser). Please read https://docs.telethon.dev/en/stable/concepts/entities.html to find out more details.

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

Telethon Chat

TL Reference for SendStoryRequest

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

Telethon Chat

TL Reference for GetPremiumPromo

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

Telethon Chat

Is there any method to check in which groups our account is an owner

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

Telethon Chat

Where is the document?

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

Telethon Chat

How to find a Gift ID on a profile that is successfully detected?

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

Telethon Chat

How telethon checks the profile of users who have stars gift (not NFT), for example like the photo above the bot will call it each.

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

Telethon Chat

/channel/TelethonChat/690471

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

Telethon Chat

When I made a request in the group

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

Telethon Chat

iirc group/channel chat ids are all negtive numbers

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

Telethon Chat

Which format of chat id shoud pass to messages.MigrateChat ?!

-1001234567
-1234567
1234567

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

Telethon Chat

How to set passkey with telethon?

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

Telethon Chat

There seems to be something wrong, I didn't find debugging either, can you help? I did a trial by using gift star

@userbot.on(events.NewMessage(incoming=True))
async def gift_handler(event):
msg = event.message
action = msg.action

if not action:
return

if isinstance(action, types.MessageActionGiftPremium):
gift = action.gift
print("\n⭐ PREMIUM GIFT")
await event.respond("Terima kasih atas Premium Giftnya 😊")
return

if isinstance(action, types.MessageActionStarGiftUnique):
gift = action.gift
sender = await event.get_sender()

print("\n🎁 UNIQUE GIFT (NFT) DITERIMA")
await event.respond("Unique Gift Diterima 🧡 (NFT)")

try:
await transfer_unique_gift(
userbot,
target=sender,
gift=gift
)
await event.respond("NFT kamu sudah aku kembalikan 😎")
except Exception as e:
await event.respond(f"❌ Gagal mengirim balik gift: {e}")

return

if isinstance(action, types.MessageActionStarGift):
gift = action.gift
print("\n🎁 STAR GIFT")
await event.respond("Terima kasih atas Star Giftnya ⭐")
return

if isinstance(action, types.MessageActionStarGiftStars):
print("\n🌟 STARS")
await event.respond(f"Terima kasih atas {action.stars} Stars 🌟")
return

if isinstance(action, types.MessageActionGiftCode):
print("\n🎟️ GIFT CODE")
await event.respond(f"Kode Gift diterima 🎟️\n`{action.slug}`")
return

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

Telethon Chat

hi i am using this this code to forward the messages to a certain groupchat... after one forward the accs get frozen


# send.py
from opentele.tl import TelegramClient
import asyncio
import time

async def main():
client = TelegramClient("telethon.session", api_id=1, api_hash="1")
await client.start()

me = await client.get_me()
print(f"Logged in as {me.first_name} (@{me.username or 'no username'})")

source = await client.get_entity("a")
target = await client.get_entity("xxx")

print(f"Source → {source.title}")
print(f"Target → {target.title}")
print("Forwarding message 130 every 5 minutes – rock solid version\n")

while True:
try:

target = await client.get_entity("xxx")

await client.forward_messages(target, 130, source)
print(f"[{time.strftime('%H:%M:%S')}] Message 130 forwarded")
except Exception as e:
print(f"[{time.strftime('%H:%M:%S')}] Error: {e}")

await asyncio.sleep(300)

asyncio.run(main())

i am using soft reg accounts usa and converting the tdata to .session files

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

Telethon Chat

I remember that I only needed to call get_dialogs once at startup before I could use it normally.

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

Telethon Chat

TL Reference for ForwardMessage

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

Telethon Chat

is there any method availble to forward stories?

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

Telethon Chat

Is there any way to check telegram premium expiration date using telethon??

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

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

printing gift object maybe?

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

Telethon Chat

TL Reference for GetSavedStarGiftsRequest

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

Telethon Chat

Yes, it works, Thank you

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

Telethon Chat

You can send messages to members who requested to join the group. After the quiz process you approve the request.

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

Telethon Chat

Hi, If I have to do something like this, how can I do it?

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

Telethon Chat

TL Reference for MigrateChat

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

Telethon Chat

i think it's only possible with official client

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

Telethon Chat

/channel/TelethonChat/691218 ?

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

Telethon Chat

1. Don't use Ai-Code
2. This action counts as spam by telegram
3. Telegram is sensitive to fake USA virtual accounts
4. We don't provide help for spam counted subjects

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

Telethon Chat

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

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