Skip to content

Commit 151fca3

Browse files
committed
fix: I'm sb
1 parent 6da87f2 commit 151fca3

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

ffxivbot/handlers/QQCommand_bot.py

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from .QQEventHandler import QQEventHandler
2-
from .QQGroupCommand_sonar import GLOBAL_SONAR_RANKS
2+
from .QQGroupCommand_sonar import GLOBAL_SONAR_RANKS, get_server_from_keyword
33
from .QQUtils import *
44
from ffxivbot.models import *
55
import copy
@@ -12,19 +12,6 @@
1212
import string
1313
import os
1414

15-
def get_server_from_keyword(keyword):
16-
if keyword == "国服" or keyword == '国':
17-
return Server.objects.all()
18-
elif keyword == "陆行鸟" or keyword == '鸟':
19-
return Server.objects.filter(areaId=1)
20-
elif keyword == "莫古力" or keyword == '猪':
21-
return Server.objects.filter(areaId=6)
22-
elif keyword == "猫小胖" or keyword == '猫':
23-
return Server.objects.filter(areaId=7)
24-
elif keyword == "豆豆柴" or keyword == '狗':
25-
return Server.objects.filter(areaId=8)
26-
return Server.objects.filter(name=keyword)
27-
2815

2916
def handle_sonar_config(bot, parameters):
3017
if len(parameters) == 0 or parameters[0] == "help": # /bot sonar (help)

ffxivbot/handlers/QQGroupCommand_sonar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import random
77

88
GLOBAL_SONAR_RANKS = [
9-
"50S", "60S", "70S", "80S", "90S", "100S"
9+
"50S", "60S", "70S", "80S", "90S", "100S",
1010
"大象", "小电视", "海呱", "地呱", "雷马", "玉藻御前", "夜光花", "长须豹女王", "贝希摩斯", "奥丁", "蛇蛇", "松鼠"
1111
]
1212

0 commit comments

Comments
 (0)