qbot | A plugin based bot framework for Telegram , using Telethon | Bot library
kandi X-RAY | qbot Summary
kandi X-RAY | qbot Summary
A plugin based, (user)bot framework for Telegram, somewhat inspired by otouto, and uniborg. For userbot plugins, see qserbot_plugins. For an api bot with more built-in plugins, see tanyabot.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Wrap a cooldown timer
- Log an event
- Respond to the bot
- Ping a ping message
- Start the bot
qbot Key Features
qbot Examples and Code Snippets
Community Discussions
Trending Discussions on qbot
QUESTION
Here is the error:
...ANSWER
Answered 2020-Nov-17 at 23:00You wrote that the object files depend on your C++ files, but you didn't include a rule for making the object files from your C++ files. You can see that you never invoke g++
with .cpp
file arguments. What I think is happening, is make
, not seeing a rule, just makes empty object files.
QUESTION
We are sending the notification to all users using a web job. but the problem is not everyone is receiving the notification at the same time. Suppose if we have to send a notification to 3000 users then the time gap between first and last user will be more than an hour.
Is there a better solution where I can send a notification to everyone at the same time just like how "QBot" is doing in Teams.
Thanks.
...ANSWER
Answered 2020-Apr-06 at 11:22If you have to send notifications one by one, then it is not possible to send them to all users at the same time. However, you can reduce the gap, but this may or may not be an easy task depending on the number of users you have.
ThrottlingOf course, you need to take throttling into consideration. Like @Nikitha-MSFT said in the comments, you will start getting HTTP 429 errors as soon as the rate limiting is hit. And you need to properly handle them and retry failed notifications.
Correct level of parallelismYou need a scalable webjob. That is, your webjob could be triggered and process multiple batches simultaneously. For example, change your webjob to message queue triggered (if it is not), so that it could process multiple queue messages each containing one or multiple notifications at the same time.
For example, you could have two webjobs:
WebJob A - triggered by timer / HTTP request, find all users need to notify and create queue message for each user found
WebJob B - triggered by queue, process message and send notification
Each job host could process 32 queue messages as the maximum asynchronously. So in theory, you could send 32 batches of notifications at the same time per job host.
Assuming you still not hit the throttling limit by far, you could then start considering increasing resources:
Scale out
You have one webjob host per app service. You could scale out your app service to have multiple instances to gain more job host instances. The more instances you have, the quicker you could clear the messages in the queue, therefore the quicker you could send notifications out.
Scale up
It is also possible, that you might hit bottleneck of your app service plan like this post did. At which point, you need to consider upgrade your plan to another tier to get more power, e.g. CPU.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install qbot
pip install -r requirements.txt
cp example_config.ini config.ini
Follow this link and login with your phone number
A Create new application window will appear. Fill in your application details. There is no need to enter any URL, and only the first two fields (App title and Short name) can currently be changed later.
Click on Create application at the end.
Add your api id, api hash, and other information to config.ini Create a bot with botfather if you need/want to If you want a userbot; add your phone number to PHONE, if you want an api bot; add your bot token to TOKEN
Start bot
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page