词条问题支持真寻的昵称开头与at真寻开头并优化回复

This commit is contained in:
HibiKier
2022-12-11 00:10:07 +08:00
parent f496ce4861
commit b59699dabe
7 changed files with 55 additions and 26 deletions
+3 -2
View File
@@ -84,8 +84,9 @@ async def word_handle(params: str, group_id: Optional[int], type_: str, word_sco
if not is_number(index) or int(index) < 0 or int(index) > answer_num:
return "指定回答下标id必须为数字且在范围内"
index = int(index)
await WordBank.delete_group_problem(problem, group_id, index, word_scope)
return "删除词条成功"
if await WordBank.delete_group_problem(problem, group_id, index, word_scope):
return "删除词条成功"
return "词条不存在"
if type_ == "update":
replace_str = params[1]
await WordBank.update_group_problem(problem, replace_str, group_id, word_scope=word_scope)