diff --git a/model/command/command.py b/model/command/command.py index 907bf58f3..8e2df5016 100644 --- a/model/command/command.py +++ b/model/command/command.py @@ -81,6 +81,10 @@ class Command: return True, self.web_search(message) if self.command_start_with(message, "keyword"): return True, self.keyword(message_obj, role) + if self.command_start_with(message, "ip"): + ip = requests.get("https://myip.ipip.net", timeout=5).text + return True, f"机器人 IP 信息:{ip}", "ip" + return False, None