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
Won't get_dialogs be automatically cached in the session file?
Читать полностью…
await client.get_dialogs()
send_search = SendSearch(client, user_id)
Is there any method to check in which groups our account is an owner
Читать полностью…
How to find a Gift ID on a profile that is successfully detected?
Читать полностью…
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.
Читать полностью…
iirc group/channel chat ids are all negtive numbers
Читать полностью…
Which format of chat id shoud pass to messages.MigrateChat ?!
-1001234567
-1234567
1234567
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
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
I remember that I only needed to call get_dialogs once at startup before I could use it normally.
Читать полностью…
is there any method availble to forward stories?
Читать полностью…
Is there any way to check telegram premium expiration date using telethon??
Читать полностью…
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.
You can send messages to members who requested to join the group. After the quiz process you approve the request.
Читать полностью…
Hi, If I have to do something like this, how can I do it?
Читать полностью…
i think it's only possible with official client
Читать полностью…
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
That is not related to Telethon. Please move to a different group with the correct topic to continue that conversation
Читать полностью…