mirror of
https://github.com/koishijs/novelai-bot
synced 2025-01-08 11:17:32 +08:00
feat: add 402 code message
This commit is contained in:
parent
9fa3f43806
commit
98d395ccb7
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "koishi-plugin-novelai",
|
||||
"description": "Generate images by NovelAI",
|
||||
"version": "1.3.2",
|
||||
"version": "1.4.1",
|
||||
"main": "lib/index.js",
|
||||
"typings": "lib/index.d.ts",
|
||||
"files": [
|
||||
|
@ -157,6 +157,8 @@ export function apply(ctx: Context, config: Config) {
|
||||
return session.text('.rate-limited')
|
||||
} else if (err.response?.status === 401) {
|
||||
return session.text('.invalid-token')
|
||||
} else if (err.response?.status === 402) {
|
||||
return session.text('.unauthorized')
|
||||
}
|
||||
}
|
||||
logger.error(err)
|
||||
|
@ -21,4 +21,5 @@ commands:
|
||||
unknown-error: 发生未知错误。
|
||||
nickname: AI 画师
|
||||
rate-limited: 访问频率过高,请稍后再试。
|
||||
invalid-token: 无效的授权令牌,请联系管理员。
|
||||
invalid-token: 令牌无效或已过期,请联系管理员。
|
||||
unauthorized: 令牌未授权,可能需要续费,请联系管理员。
|
||||
|
Loading…
Reference in New Issue
Block a user