update
This commit is contained in:
12
bot/handlers/command_graph.py
Normal file
12
bot/handlers/command_graph.py
Normal file
@@ -0,0 +1,12 @@
|
||||
from bot.utils.graph import generate_chart
|
||||
from bot.api import send_document
|
||||
from bot.storage import storage, scan
|
||||
import json
|
||||
|
||||
|
||||
async def handle_command_graph(msg):
|
||||
usr_ids, members = scan(match='usr-*', count=100)
|
||||
data = generate_chart(members)
|
||||
if data:
|
||||
r = await send_document(msg['chat']['id'], data, 'chart.svg')
|
||||
print(r)
|
Reference in New Issue
Block a user