feat: basic commands + prototype of roll parser
This commit is contained in:
parent
4b47899a3d
commit
74f991af40
4 changed files with 84 additions and 1 deletions
17
misc.py
Normal file
17
misc.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
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).",
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue