parent
55b4101efc
commit
0ab9cc662e
|
@ -0,0 +1,13 @@
|
|||
from src import ModuleManager, utils
|
||||
from datetime import datetime, timedelta, timezone
|
||||
|
||||
|
||||
class Module(ModuleManager.BaseModule):
|
||||
_name = ".beat"
|
||||
|
||||
@utils.hook("received.command.beat")
|
||||
@utils.kwarg("help", "Gives the current .beat time")
|
||||
def beat(self, event):
|
||||
now = datetime.now(timezone(timedelta(hours=1)))
|
||||
beat_time = ((now.hour * 3600) + (now.minute * 60) + now.second) / 86.4
|
||||
event["stdout"].write(f"The current .beat time is @{beat_time:0.2f}")
|
Loading…
Reference in New Issue