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
user_retries = {}
user_retries[user_id][forwards] = {'forwards': 1}
if user_retries[user_id][forwards] <= 3:
pass
user_retries[user_id][forwards] += 1
else:
print('you can only forward 3 messages from this user per day')
mess code but it's just example
Hello, I wanted to note that the documentation for SearchPostsRequest seems wrong.
https://tl.telethon.dev/methods/stories/search_posts.html
hashtag can not be omitted and is not optional.
It looks like this was noted in a closed issue on the github but the documentation was left unchanged.
https://github.com/LonamiWebs/Telethon/issues/4547
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.
New StackOverflow question
How to Receive Telegram Messages in Less Than 500ms?
https://stackoverflow.com/q/79518523
,thumb=types.InputWebDocument("https://emoji.aranja.com/static/emoji-data/img-apple-160/1f3b6.png",0,"image/png",[]))])
Читать полностью…import randomЧитать полностью…
from telethon import functions, types
async def send_screenshot_notification(client, chat_id, msg_id):
await client(functions.messages.SendScreenshotNotificationRequest(
peer=await client.get_entity(chat_id),
reply_to=types.InputReplyToMessage(reply_to_msg_id=msg_id),
random_id=random.randint(1, 2**63 - 1)
))
await send_screenshot_notification(client, 93602376, 12)
https://telegram.org/verify#third-party-verification
Читать полностью…/channel/TelethonChat/657398
/channel/TelethonChat/657369
use
functions.channels.GetAdminedPublicChannelsRequest() or get_dialogs
You should find a different way to link the channel message to it's forward in the group, and then reply in the group directly
Читать полностью…That's not really documentation, it's auto generated api reference. and Telegram schema decides what's optional. tag can be omitted if area search was done
Читать полностью…Is it possible to gift telegram premium using an API
Читать полностью…ofc
actually you taught me this yourself
just extract the messages attributes, and add one per user when the name matches
you just use get messages to get the messages
I have a private telegram channel where i forward messages from users. Can I somehow use self bot to run a loop on all messages in chat (to count how much messages per user)
Читать полностью…Missing thumbnail
I know this question has been brought up a few times already, but I don't seem to find an answer.
I have harchoir installed, and I'm passing a file to thumb=. Somehow the uploaded file still doesn't have a thumbnail.
What can I be doing wrong?
how to send the screenshot notification using SendScreenshotNotificationRequest ?
———
Answer:
import randomЧитать полностью…
from telethon import functions, types
async def send_screenshot_notification(client, chat_id, msg_id):
await client(functions.messages.SendScreenshotNotificationRequest(
peer=await client.get_entity(chat_id),
reply_to=types.InputReplyToMessage(reply_to_msg_id=msg_id),
random_id=random.randint(1, 2**63 - 1)
))
await send_screenshot_notification(client, 93602376, 12)
How? And which organisations are included? Any docs?
Читать полностью…how i can open "startapp" links with telethon account?
Читать полностью…what update we receive as bot when bot got added to channel or group
Читать полностью…