hemppa/modules/uptime.py

15 lines
388 B
Python
Raw Normal View History

2019-12-09 20:44:45 +02:00
import time
class MatrixModule:
def matrix_start(self, bot):
self.starttime = time.time()
async def matrix_message(self, bot, room, event):
await bot.send_text(room, 'Uptime: ' + str(int(time.time() - self.starttime)) + ' seconds.')
def matrix_stop(self, bot):
pass
def help(self):
return('Tells how many seconds the bot has been up.')