From c5c7e686d0ee1f84a88be61e274f0047500db470 Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Wed, 20 Dec 2023 16:14:42 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20ip=20=E4=BF=A1=E6=81=AF=E6=8C=87?= =?UTF-8?q?=E4=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/command/command.py | 4 ++++ 1 file changed, 4 insertions(+) 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