Answer the question
In order to leave comments, you need to log in
How to create admin panel in telegram bot, in python using telebot?
There is an idea, we need an admin panel in the bot for a specific id with the following functionality: view stats - the bot showed user statistics (how many, how many connected in 24 hours / per month, what is the increase in 24 hours / month),
Send message to everyone / to a specific user (needed to send something to all users or a specific user) and BanID (so that the bot would block the user by ID)
Answer the question
In order to leave comments, you need to log in
I want to say in advance that maybe I didn’t quite understand your question, but I’ll try to answer anyway. Well, the bot must check the chat_id at startup, if this is your chat_id, then the bot adds additional commands.
And to create statistics, it’s probably better to use a database, every day when you press the start button, the bot adds 1 to the peopleToday variable. Every day this variable is stored in the database. For mailing, you also need a database with user ids, and when you click the Send message to everyone command, a loop is created that goes through all users in the database and sends them the message that you entered. For the BanID command, since at startup we check the id of all users, if this id is banned, then he receives a message that he is banned.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question