Skip to content

Commit 8276475

Browse files
committed
🩹 权限不足时结束响应器并发送提示
1 parent e6cf607 commit 8276475

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

nonebot_plugin_deepseek/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@
113113
@deepseek.assign("balance")
114114
async def _(is_superuser: bool = Depends(SuperUser())):
115115
if not is_superuser:
116-
return
116+
await deepseek.finish("该指令仅超管可用")
117117
try:
118118
balances = await API.query_balance(model_config.default_model)
119119

@@ -154,7 +154,7 @@ async def _(
154154
model: Query[str] = Query("model.set.model"),
155155
):
156156
if not is_superuser:
157-
return
157+
await deepseek.finish("该指令仅超管可用")
158158
model_config.default_model = model.result
159159
model_config.save()
160160
await deepseek.finish(f"已设置默认模型为:{model.result}")

0 commit comments

Comments
 (0)