mirror of
https://github.com/civsocit/olgram.git
synced 2023-07-22 01:29:12 +03:00
debug info in /info command
This commit is contained in:
parent
ce408591c4
commit
3aa878ff87
@ -4,6 +4,7 @@
|
||||
|
||||
from aiogram import types
|
||||
from aiogram.dispatcher import FSMContext
|
||||
import socket
|
||||
from olgram.models import models
|
||||
|
||||
from olgram.router import dp
|
||||
@ -28,8 +29,11 @@ async def info(message: types.Message, state: FSMContext):
|
||||
income_messages = sum([bot.incoming_messages_count for bot in bots])
|
||||
outgoing_messages = sum([bot.outgoing_messages_count for bot in bots])
|
||||
|
||||
hostname = socket.gethostname()
|
||||
|
||||
await message.answer(f"Количество ботов: {bots_count}\n"
|
||||
f"Количество пользователей (у конструктора): {user_count}\n"
|
||||
f"Шаблонов ответов: {templates_count}\n"
|
||||
f"Входящих сообщений у всех ботов: {income_messages}\n"
|
||||
f"Исходящих сообщений у всех ботов: {outgoing_messages}\n")
|
||||
f"Исходящих сообщений у всех ботов: {outgoing_messages}\n"
|
||||
f"Хост: {hostname}")
|
||||
|
Loading…
Reference in New Issue
Block a user