2018-03-16 03:13:43 -04:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
"""
|
|
|
|
How long the bot has been running.
|
|
|
|
"""
|
|
|
|
import datetime
|
|
|
|
|
|
|
|
from module import commands
|
|
|
|
|
|
|
|
|
|
|
|
def setup(bot):
|
|
|
|
if "uptime" not in bot.memory:
|
|
|
|
bot.memory["uptime"] = datetime.datetime.now()
|
|
|
|
|
|
|
|
|
|
|
|
@commands('uptime')
|
|
|
|
def uptime(bot, trigger):
|
2018-03-25 14:27:40 -04:00
|
|
|
""".uptime - Returns the uptime of Fulvia."""
|
2018-03-16 03:13:43 -04:00
|
|
|
delta = datetime.timedelta(seconds=round((datetime.datetime.now() -
|
|
|
|
bot.memory["uptime"]).total_seconds()))
|
|
|
|
bot.say(f"I've been sitting here for {delta} and I keep going!")
|
2018-03-25 14:27:40 -04:00
|
|
|
|
|
|
|
|
|
|
|
@commands('updick')
|
|
|
|
def updick(bot, trigger):
|
|
|
|
""".updick - Returns the uptime of Fulvia, measured in dicks."""
|
|
|
|
delta = datetime.datetime.now() - bot.memory["uptime"]
|
|
|
|
bot.say("8" + "="*delta.days + "D")
|