From 151fca30ac74d0e091ba790a5e2c3ed763775af9 Mon Sep 17 00:00:00 2001 From: Bluefissure Date: Fri, 27 Sep 2024 07:52:24 +0800 Subject: [PATCH] fix: I'm sb --- ffxivbot/handlers/QQCommand_bot.py | 15 +-------------- ffxivbot/handlers/QQGroupCommand_sonar.py | 2 +- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/ffxivbot/handlers/QQCommand_bot.py b/ffxivbot/handlers/QQCommand_bot.py index f154e907..a59bd690 100644 --- a/ffxivbot/handlers/QQCommand_bot.py +++ b/ffxivbot/handlers/QQCommand_bot.py @@ -1,5 +1,5 @@ from .QQEventHandler import QQEventHandler -from .QQGroupCommand_sonar import GLOBAL_SONAR_RANKS +from .QQGroupCommand_sonar import GLOBAL_SONAR_RANKS, get_server_from_keyword from .QQUtils import * from ffxivbot.models import * import copy @@ -12,19 +12,6 @@ import string import os -def get_server_from_keyword(keyword): - if keyword == "国服" or keyword == '国': - return Server.objects.all() - elif keyword == "陆行鸟" or keyword == '鸟': - return Server.objects.filter(areaId=1) - elif keyword == "莫古力" or keyword == '猪': - return Server.objects.filter(areaId=6) - elif keyword == "猫小胖" or keyword == '猫': - return Server.objects.filter(areaId=7) - elif keyword == "豆豆柴" or keyword == '狗': - return Server.objects.filter(areaId=8) - return Server.objects.filter(name=keyword) - def handle_sonar_config(bot, parameters): if len(parameters) == 0 or parameters[0] == "help": # /bot sonar (help) diff --git a/ffxivbot/handlers/QQGroupCommand_sonar.py b/ffxivbot/handlers/QQGroupCommand_sonar.py index 7d004f54..2a864851 100644 --- a/ffxivbot/handlers/QQGroupCommand_sonar.py +++ b/ffxivbot/handlers/QQGroupCommand_sonar.py @@ -6,7 +6,7 @@ import random GLOBAL_SONAR_RANKS = [ - "50S", "60S", "70S", "80S", "90S", "100S" + "50S", "60S", "70S", "80S", "90S", "100S", "大象", "小电视", "海呱", "地呱", "雷马", "玉藻御前", "夜光花", "长须豹女王", "贝希摩斯", "奥丁", "蛇蛇", "松鼠" ]