示例#1
0
文件: cmd.py 项目: beiliubei/clubot
 def _tq(self, stanza, *args):
     """指定城市获取天气"""
     tq = Complex()
     body = tq.tq("".join([x for x in args]))
     self._send_cmd_result(stanza, body)
     self._message_bus.send_all_msg(stanza, body)
示例#2
0
文件: cmd.py 项目: beiliubei/clubot
 def trans(self, stanza, *args):
     """中日英翻译,默认英-汉翻译"""
     trans = Complex()
     return self._send_cmd_result(stanza, trans.trans([x for x in args]))