浏览代码

Merge 346e7a5548 into a926431754

pull/46/merge
Kunal Mehta 11 年前
父节点
当前提交
4841727832
共有 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): class Time(Command):
"""Report the current time in any timezone (UTC default), or in beats.""" """Report the current time in any timezone (UTC default), or in beats."""
name = "time" name = "time"
commands = ["time", "beats", "swatch"]
commands = ["time", "beats", "swatch", "epoch"]


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


正在加载...
取消
保存