Added uptime module
This commit is contained in:
parent
e26aea6f54
commit
d4bfe1f020
|
@ -0,0 +1,14 @@
|
||||||
|
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.')
|
Loading…
Reference in New Issue