malware/misc.py

17 lines
532 B
Python

from datetime import datetime
async def ping(bot, mtch, room, message):
await bot.api.send_text_message(room.room_id, "Pong")
async def echo(bot, mtch, room, message):
await bot.api.send_text_message(room.room_id, " ".join(mtch.args()))
async def uptime(bot, mtch, room, message):
delta = datetime.now() - bot.start_time
await bot.api.send_text_message(
room.room_id,
f"Le bot est actif depuis {int(delta.total_seconds())} secondes (en gros {int(delta.total_seconds() / 86400)} jours).",
)