mirror of
https://github.com/civsocit/olgram.git
synced 2025-12-17 05:26:18 +00:00
info
This commit is contained in:
26
olgram/commands/info.py
Normal file
26
olgram/commands/info.py
Normal file
@@ -0,0 +1,26 @@
|
||||
"""
|
||||
Здесь метрики
|
||||
"""
|
||||
|
||||
from aiogram import types
|
||||
from aiogram.dispatcher import FSMContext
|
||||
from olgram.models import models
|
||||
|
||||
from olgram.router import dp
|
||||
from olgram.settings import OlgramSettings
|
||||
|
||||
|
||||
@dp.message_handler(commands=["info"], state="*")
|
||||
async def info(message: types.Message, state: FSMContext):
|
||||
"""
|
||||
Команда /info
|
||||
"""
|
||||
|
||||
if message.from_user.id != OlgramSettings.supervisor_id():
|
||||
return
|
||||
|
||||
bots_count = len(await models.Bot.all())
|
||||
user_count = len(await models.User.all())
|
||||
|
||||
await message.answer(f"Количество ботов: {bots_count}"
|
||||
f"Количество пользователей: {user_count}")
|
||||
Reference in New Issue
Block a user