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

if the parameters are the same, edit_message does support passing a file

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

Telethon Chat

New StackOverflow question
Problem at providing entities to NewMessage event

https://stackoverflow.com/q/79146370

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

Telethon Chat

you do it by another api not related to Telethon / Telegram

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

Telethon Chat

guys, can i get api_hash and api_id of the account using program or i have to do it manualy

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

Telethon Chat

you can. except for sending inline buttons

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

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

The bot is already responding to the message from the channel to the group; it just isn't sending to specific topics. That's all I want.

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

Telethon Chat

else block for adding via username.

both attributes result.missing_invities and result.updates.users are empty but I suppose it should not be so.

May be it is bad apporoach to use ImportContactsRequest ?

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

Telethon Chat

the code is honestly useless, plus I'm a bit sleepy to make sense of "bot will monitor whether the last message in the topics is from the bot or not", make sure you know what a bot is allowed to do in the API

if your flow explicitly depends on forum topics and other recent enough features like quote replies, and you are referring to a real bot with "bot" and not userbot, just use another BotApi library that has proper topic support than telethon

if you pick telethon, you should know what you're doing, and I linked you a clear way of what how to deal with topics

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

Telethon Chat

whatever you're going through, we'll discuss it once you show a code you understand what is wrong with

and showing video or screenshot will also reduce the time it takes to convey your goals and of an answer

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

Telethon Chat

                    contacts = [
InputPhoneContact(
client_id=random.randrange(-2**63, 2**63),
phone=phone,
first_name=f'first_{hash(phone)}',
last_name=f'last_{hash(phone)}'
)]

result = await client(ImportContactsRequest(contacts=contacts))
if result.users:
user = result.users[0]
else:
raise PrivacyRestrictedError

res = await client(InviteToChannelRequest(chat, [user]))
else:
res = await client(InviteToChannelRequest(chat, [username]))
if res.missing_invitees:
raise PrivacyRestrictedError


When trying to import contact end then extract an User and then to add it to a group .missing_invities is always empty at the same time result.users is also empty and user was not added in fact.

How to handle this problem or where is mistake ?

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

Telethon Chat

But the person who did this was a friend and not an AI.

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

Telethon Chat

Can someone help me with a code here? It's for a bot on Telegram:

What I'm trying to do is, reply to a specific message from a channel and send it to topics in a group, the bot will monitor whether the last message in the topics is from the bot or not, if not it will reply again

Can someone help me?

https://hastebin.com/share/vahajojahe.python

group topic id is 1, 2, 5

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

Telethon Chat

how to get unread dialogues?

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

Telethon Chat

Does anyone know an analogue for Tinder?

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

Telethon Chat

New api update let's update a message adding a media, can we already do that with current telethon or it needs to be updated?

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

Telethon Chat

/channel/TelethonChat/619460

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

Telethon Chat

how to delete message for myself?

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

Telethon Chat

it's a question in case you don't no

if you mean profile photo limits, it's not very specified, telethon already keeps them in file size limit, so ratio should be resized by Telegram

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

Telethon Chat

Hello! Can anyone help me? I'm trying to make a userbot with Telethon that reacts to a command like /start, responds with text, and includes inline buttons. Can I do this with Telethon? Thank you for your answer!

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

Telethon Chat

This bot isn't useless to me, but thank you for your attention. I'll try elsewhere. I really appreciate it, brother. ❤️🙏🏽

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

Telethon Chat

I won't lie, man. This code was made for me by a friend, but he's been busy lately and can't help me right now. So I was trying to do it on my own with the help of AI, but I don't have any programming knowledge. That's why I'm here asking for your help.

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

Telethon Chat

The code is 90% ready; I just want it to respond to a message from a channel to a group that has 3 topics. So when someone sends a message in one of these 3 topics, the bot will reply again. That's all I want. Can I add you to the group where I'm testing the bot so you can better understand what I'm trying to say?

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

Telethon Chat

ok, can i send the code here?

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

Telethon Chat

your totally legit 100% no cap usecase may be getting unfairly oppressed by the math heads on server, if you believe so, contact them or something

besides, when result.users is empty it should be raising as you coded the else block if not see the other attributes of "result", otherwise it's something to do with that chat in particular

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

Telethon Chat

Dude, can you help me do what I said? I've been trying to do this for a while now and I can't, and I've joined more than 20 groups, I ask for help and no one answers.

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

Telethon Chat

there are no friendly properties for topics, and there won't be, see /channel/TelethonChat/611203 (message == event) to know how to know topic of an event and send something to a topic_id.

anything else will you need explain whatever you're doing properly, with less AI in code

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

Telethon Chat

Documentation for iter_dialogs

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

Telethon Chat

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

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

Telethon Chat

if proxy when unused sends the code, you know who to ask, either blame the proxy or blame yourself for using a proxy and later blame Telegram for making you blame the proxy and yourself

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