Kunal Mehta 10 роки тому
джерело
коміт
346e7a5548
1 змінених файлів з 4 додано та 1 видалено
  1. +4
    -1
      earwigbot/commands/time_command.py

+ 4
- 1
earwigbot/commands/time_command.py Переглянути файл

@@ -32,12 +32,15 @@ pytz = importer.new("pytz")
class Time(Command):
"""Report the current time in any timezone (UTC default), or in beats."""
name = "time"
commands = ["time", "beats", "swatch"]
commands = ["time", "beats", "swatch", "epoch"]

def process(self, data):
if data.command in ["beats", "swatch"]:
self.do_beats(data)
return
if data.command == "epoch":
self.reply(data, time())
return
if data.args:
timezone = data.args[0]
else:


Завантаження…
Відмінити
Зберегти