feat: ip 信息指令

This commit is contained in:
Soulter
2023-12-20 16:14:42 +08:00
parent bd28f880f6
commit c5c7e686d0
+4
View File
@@ -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