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
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.
I mean like @a_a_a you understand me in sometimes it be available
Читать полностью…
Is it possible for Telethon to search for available three-letter usernames or available rare gifts?
Читать полностью…
It's only available for the first chat initiated by the other user.
Читать полностью…
yes, like when the user text on my account i want to fetch the account number country
Читать полностью…
is it possible to check where the account belongs to using telethon ?
Читать полностью…
https://github.com/Aayco/SaveBot/blob/main/bot.py
Читать полностью…
just add dots between digits, or make an inline keyboard code input
Читать полностью…
telegram is smart enough to understand OTP once user send it. the OTP becomes disabled
Читать полностью…
You have to make bot admin or change /setprivacy in botfather
tg_client.add_event_handler(
handle_reaction_update, events.Raw(UpdateBotMessageReaction)
)
This doesn't work for supergroups as a bot (small groups work fine )
he couldn't get the message itself to get the six digit code by re
Читать полностью…
and in some cases, if they text you after both of your chats were deleted and a long time has passed.
Читать полностью…
PeerSettings(
settings=PeerSettings(
report_spam=False,
add_contact=False,
block_contact=False,
share_contact=False,
need_contacts_exception=True,
report_geo=False,
autoarchived=False,
invite_members=False,
request_chat_broadcast=False,
business_bot_paused=False,
business_bot_can_reply=False,
geo_distance=None,
request_chat_title=None,
request_chat_date=None,
business_bot_id=None,
business_bot_manage_url=None,
charge_paid_message_stars=None,
registration_month=None,
phone_country=None,
name_change_date=None,
photo_change_date=None
),
chats=[
],
users=[
]
)
It does not , I saw some people doing this same thing
Читать полностью…
async def extract_otp_from_messages(client: TelegramClient, chat_id: int = 777000) -> Optional[str]:
"""Fetch the recent otp code from telegram service notifications."""
try:
current_time = datetime.now(timezone.utc)
# reverse=False gets the newest messages first
messages = await client.get_messages(chat_id,
limit=5, reverse=False)
for message in messages:
if message.text and "Login code:" in message.text:
match = re.search(r"Login code:\s*(\d{5,6})", message.text)
if match:
otp_code: str = match.group(1)
message_time = message.date
time_diff = (current_time - message_time).total_seconds()
# allow up to 60 seconds buffer
if 0 <= time_diff <= 60:
print(f"[✓] OTP Code Found: {otp_code}")
print(f" Message Age: {int(time_diff)} seconds")
return otp_code
return None
except Exception as e:
print(f"[✗] Error extracting OTP: {str(e)}")
return None
I’m still not able to read the sign in code
Читать полностью…
Can u give me a snippet im still unable to iter it
Читать полностью…
Which function is used to transfer an NFT to another account?
Читать полностью…
It will just forward whole message, just get the code, by six digit.
Читать полностью…