diff --git a/mosfet/commands.py b/mosfet/commands.py index 5771f7f..83de7ef 100644 --- a/mosfet/commands.py +++ b/mosfet/commands.py @@ -1,5 +1,6 @@ import re import time +from datetime import datetime, timedelta import random from itertools import count from munch import Munch @@ -140,7 +141,10 @@ class Commands: ## !time - replies with Minecraft world time if command == 'time': - reply = str(self.g.time) + seconds = self.g.time * 3.6 + start = datetime(2000, 1, 1, hour=6) + mctime = start + timedelta(seconds=seconds) + reply = str(self.g.time) + ' - ' + mctime.strftime('%I:%M %p') ## !count [id] - counts the number of items with that id if command == 'count' and data: