Comments (11)
Ok, I'll give it a try.
from telethon.
Yet, all tests passed without errors! One last test left with 40 simultanious message pins in 40 chats. I'll test in about half an hour and let you know. So far results are very optimistic ;)
from telethon.
I'm really glad it works better now. I would still expect bugs though ;) Hopefully rare enough.
from telethon.
Related to #27, I'm not sure how to fix thisβ¦
I've made sending Pong if there's ping in the message body.
What do you mean?
from telethon.
What do you mean?
In my sample script_client class There's init with connect and run method. With registering update_handler and then endless while loop. Update handler is static function, so inside it I can't have access to self of my class, so I can't call send function there.
-
I made a queue of received messages that is populated inside update_handler.
-
In run method inside a while loop there's a check for messages in a queue. If it's
len(queue) > 0
I get one element and check message text, so that I can make autoanswer. If text = 'ping' I send back 'pong'. That's all.
from telethon.
The update_handler
inside the InteractiveTelegramClient
is just an example, it doesn't have to be a @staticmethod
if you don't want to. You can remove the @staticmethod
part and add a first self
parameter to suit your needs.
from telethon.
I moved sending "pong" to update_handler, right after receiving "ping". That helped for a while, but after 20 ping requests in a row it still failed with the same error.... But as you already mentioned it seems to be #27 related. :(
from telethon.
After solving #47 perhaps the introduced changes there also fixed this. Could you please try with the upstream version and provide me some feedback about it?
from telethon.
@Lonami is it possible to update in pip
so that I can check it easily?
from telethon.
I would rather you tried the upstream version, please. I would like to test it before releasing a new version out there to the wild, you know?
You can replace the telethon
folder with the upstream one (remember to generate the TLObjects), probably located at either of these locations:
/usr/local/lib/python3.5/dist-packages/
if usedpip3
.~/.local/lib/python3.5/site-packages/
if usedpip3
with--user
/usr/lib/python3.5/
if usedapt
from telethon.
Aaaaaaand that's it! Everything works great. So you can release it ))) I'll close the issue
from telethon.
Related Issues (20)
- RPCError 400: CALL_PROTOCOL_LAYER_INVALID HOT 3
- Intermittent Message Reception Delays and Bursts in Telethon HOT 1
- Message Sending Failure with arabic symbols HOT 4
- Silence ID3v2 Warn Logs during audio file update HOT 4
- Support for Channels Recommendations HOT 1
- RPCError 400: TOPIC_ID_INVALID HOT 1
- stuck while start() HOT 1
- updateapptologin error HOT 2
- client.download_media(event.message,bytes) - not load bypes HOT 2
- Constant access_hash=3107249229418738550 in media=MessageMediaGeo(geo=GeoPoint( access_hash=3107249229418738550)) HOT 1
- Invert media on send HOT 1
- Cannot forward message if I don't interact with group first HOT 1
- Connot connect with the WEB API key HOT 2
- [v2] Type hint support to @client.on HOT 1
- Can I send my contact in chat? HOT 1
- telegram added RPCError 420: FLOOD_PREMIUM_WAIT
- Add Support for Hashtag Search (between all public channels) HOT 1
- Can't upload large file because FLOOD_PREMIUM_WAIT_9 (caused by SaveFilePartRequest) keeps interrupting the upload HOT 2
- Multi session HOT 1
- Can't get User id... HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from telethon.