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

I have 2 accounts communicating with each other in the chat, but I don't understand how they can reply to each other?
m = await client.send_message(chat_id, text, reply_to=old_m.id)

not working :(

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

Telethon Chat

I use StringSession for this

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

Telethon Chat

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

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

Telethon Chat

how can i convert telethon session to telegram web?

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

Telethon Chat

Is there any way I can access the date column natively through telethon without using sqlite3?

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

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

hi, can I use filter of iter_messages in negative way? I want to get all the NON service messages

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

Telethon Chat

how to ignore italics, bold, etc in pattern update New.Message?

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

Telethon Chat

Fatal errors either throw an exception or start with the ERROR: prefix (if logging is set up correctly). Rest can be ignored most of the time.

There's also FATAL but I don't think telethon uses the level

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

Telethon Chat

i need answers please

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

Telethon Chat

4096 normal messages, 1024 for media caption

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

Telethon Chat

Normal users 2048
Premium 4096
I guess!

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

Telethon Chat

Who knows how to implement API
Eg crypto API

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

Telethon Chat

why do i get this

Server closed the connection: 0 bytes read on a total of 8 expected bytes


it dosent affect anything and happens rarely, i just want to know what is it for or does it break anything or how to stop it from appearing

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

Telethon Chat

Remember search is your friend

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

Telethon Chat

iter_messages yields a patched message or a tl message?

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

Telethon Chat

from telethon import TelegramClient

api_id = 'YOUR_API_ID'
api_hash = 'YOUR_API_HASH'
bot_token = 'YOUR_BOT_TOKEN'

bot = TelegramClient('bot', api_id, api_hash).start(bot_token=bot_token)

async def main():
await bot.send_message('username_or_chat_id', 'test message')

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



Try this

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

Telethon Chat

I need 2022 and 2021 seller dm me

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

Telethon Chat

New StackOverflow question
Telethon client .session + socks5 proxy quick deauthorization

https://stackoverflow.com/q/79242820

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

Telethon Chat

Hi

+1 Canada - Usa Old And New Available Price 0.40

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

Telethon Chat

currently I'm doing:

        messages = [
message
async for message in bot.iter_messages(channel_id, 100)
if not message.action
]

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

Telethon Chat

Tdata sessionjson for sell

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

Telethon Chat

how to track when you've been accepted into a private group where request_needed?

UPD:
You can do it with this:

async def handle_crawler_chat_removal(client: TelegramClient):
client_me = await get_me(client=client)
@client.on(events.Raw) # type: ignore
async def handler(event):
logger.info(event.stringify())

if isinstance(getattr(event, 'message', None), MessageService) and \
isinstance(event.message.action, MessageActionChatDeleteUser) and \
event.message.action.user_id == client_me.id:
logger.info(f'You were removed from Chat: {event.peer_id.chat_id}')
await decrease_chats_count(client=client)

async def handle_crawler_acceptance_or_removal(client: TelegramClient):
@client.on(events.Raw) # type: ignore
async def handler(event):
if isinstance(event, UpdateChatParticipants): # type Chat
logger.info(f"You were accepted into the basic_group: {event.participants.chat_id}")
input_entity = await client.get_input_entity(PeerChat(event.participants.chat_id))
await entity_like_queue.append(client=client, entity=input_entity)
elif isinstance(event, UpdateChannel): # type Channel
input_entity = await client.get_input_entity(PeerChannel(event.channel_id))
try:
entity = await client.get_entity(input_entity)
logger.info(f'You were accepted into the channel/supergroup or you get a update: {event.channel_id}')
await entity_like_queue.append(client=client, entity=entity) # type: ignore
except ChannelPrivateError:
logger.info(f'You were deleted from the channel/supergroup: {event.channel_id}')
await decrease_chats_count(client=client)

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

Telethon Chat

It's a warning only. Set the logging level to error or debug

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

Telethon Chat

try:
check_chat = await client(functions.messages.CheckChatInviteRequest(hash=link_hash))
if check_chat.request_needed:
pass
updates = await client(functions.messages.ImportChatInviteRequest(link_hash))

await increase_chats_count(client=client)
except errors.InviteRequestSentError:
# You have successfully requested to join this chat or channel.
pass
except Exception:
pass


how to track when you've been accepted into a group where request_needed?

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

Telethon Chat

There's no difference between a normal or premium user in this case as I know

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

Telethon Chat

sorry for the dumb question.
what's the maximum number of characters for a message

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

Telethon Chat

Can anyone give me any bot that can help me to get OTP from string session

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

Telethon Chat

New StackOverflow question
Errors whilst trying to run a telethon python script made by AI

https://stackoverflow.com/q/79241748

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

Telethon Chat

Remember search is your friend

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