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)
def trans(self, stanza, *args): """中日英翻译,默认英-汉翻译""" trans = Complex() return self._send_cmd_result(stanza, trans.trans([x for x in args]))