Update
This commit is contained in:
parent
14667306a1
commit
41e3313288
15 changed files with 69 additions and 55 deletions
|
@ -27,7 +27,7 @@
|
||||||
"arcaea.message.failed.fetch": "Failed to fetch.",
|
"arcaea.message.failed.fetch": "Failed to fetch.",
|
||||||
"arcaea.message.invalid.friendcode.format": "Please enter the correct friend ID!",
|
"arcaea.message.invalid.friendcode.format": "Please enter the correct friend ID!",
|
||||||
"arcaea.message.invalid.friendcode.non_digital": "Friend ID must be 9 digits!",
|
"arcaea.message.invalid.friendcode.non_digital": "Friend ID must be 9 digits!",
|
||||||
"arcaea.message.user.unbound": "Unbound user. Please bind user by \"${prefix}arcaea bind <friendcode>\".",
|
"arcaea.message.user_unbound": "Unbound user. Please bind user by \"${prefix}arcaea bind\".",
|
||||||
"arcaea.message.no_webrender": "No webrender configured, this command cannot be used.",
|
"arcaea.message.no_webrender": "No webrender configured, this command cannot be used.",
|
||||||
"arcaea.b30.help": "Query the best 30 list of Arcaea user. ",
|
"arcaea.b30.help": "Query the best 30 list of Arcaea user. ",
|
||||||
"arcaea.b30.message.success": "Result\nBest 30:${b30} | Recent 10:${r10}\nBest 30 last 5 list: \n${last5list}",
|
"arcaea.b30.message.success": "Result\nBest 30:${b30} | Recent 10:${r10}\nBest 30 last 5 list: \n${last5list}",
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
"arcaea.message.failed.fetch": "获取失败。",
|
"arcaea.message.failed.fetch": "获取失败。",
|
||||||
"arcaea.message.invalid.friendcode.format": "请输入正确的好友 ID!",
|
"arcaea.message.invalid.friendcode.format": "请输入正确的好友 ID!",
|
||||||
"arcaea.message.invalid.friendcode.non_digital": "好友 ID 必须是 9 位数字!",
|
"arcaea.message.invalid.friendcode.non_digital": "好友 ID 必须是 9 位数字!",
|
||||||
"arcaea.message.user.unbound": "未绑定用户,请使用“${prefix}arcaea bind <friendcode>”绑定一个用户。",
|
"arcaea.message.user_unbound": "未绑定用户,请使用“${prefix}arcaea bind <friendcode>”绑定一个用户。",
|
||||||
"arcaea.message.no_webrender": "未配置 webrender,无法使用此命令。",
|
"arcaea.message.no_webrender": "未配置 webrender,无法使用此命令。",
|
||||||
"arcaea.b30.help": "查询 Arcaea 用户的 b30 列表。",
|
"arcaea.b30.help": "查询 Arcaea 用户的 b30 列表。",
|
||||||
"arcaea.b30.message.success": "获取结果\nB30:${b30} | R10:${r10}\nB30 倒 5 列表:\n${last5list}",
|
"arcaea.b30.message.success": "获取结果\nB30:${b30} | R10:${r10}\nB30 倒 5 列表:\n${last5list}",
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
"arcaea.message.failed.fetch": "取得失敗。",
|
"arcaea.message.failed.fetch": "取得失敗。",
|
||||||
"arcaea.message.invalid.friendcode.format": "請輸入正確的好友 ID!",
|
"arcaea.message.invalid.friendcode.format": "請輸入正確的好友 ID!",
|
||||||
"arcaea.message.invalid.friendcode.non_digital": "好友 ID 必須為 9 位數字!",
|
"arcaea.message.invalid.friendcode.non_digital": "好友 ID 必須為 9 位數字!",
|
||||||
"arcaea.message.user.unbound": "未綁定使用者,請使用「${prefix}arcaea bind <friendcode>」綁定一個使用者。",
|
"arcaea.message.user_unbound": "未綁定使用者,請使用「${prefix}arcaea bind」綁定一個使用者。",
|
||||||
"arcaea.message.no_webrender": "未配置 webrender,無法使用此指令。",
|
"arcaea.message.no_webrender": "未配置 webrender,無法使用此指令。",
|
||||||
"arcaea.b30.help": "查詢 Arcaea 使用者的 b30 列表。",
|
"arcaea.b30.help": "查詢 Arcaea 使用者的 b30 列表。",
|
||||||
"arcaea.b30.message.success": "取得結果\nB30:${b30} | R10:${r10}\nB30 倒 5 列表:\n${last5list}",
|
"arcaea.b30.message.success": "取得結果\nB30:${b30} | R10:${r10}\nB30 倒 5 列表:\n${last5list}",
|
||||||
|
|
|
@ -141,7 +141,7 @@ async def _(msg: Bot.MessageSession):
|
||||||
finally:
|
finally:
|
||||||
query_tasks.remove(msg.target.senderId)
|
query_tasks.remove(msg.target.senderId)
|
||||||
else:
|
else:
|
||||||
await msg.finish(msg.locale.t("arcaea.message.user.unbound", prefix=msg.prefixes[0]))
|
await msg.finish(msg.locale.t("arcaea.message.user_unbound", prefix=msg.prefixes[0]))
|
||||||
|
|
||||||
|
|
||||||
@arc.command('info [<friendcode>] {{arcaea.info.help}}')
|
@arc.command('info [<friendcode>] {{arcaea.info.help}}')
|
||||||
|
@ -164,7 +164,7 @@ async def _(msg: Bot.MessageSession):
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
await msg.finish(msg.locale.t("arcaea.message.failed.fetch"))
|
await msg.finish(msg.locale.t("arcaea.message.failed.fetch"))
|
||||||
else:
|
else:
|
||||||
await msg.finish(msg.locale.t("arcaea.message.user.unbound", prefix=msg.prefixes[0]))
|
await msg.finish(msg.locale.t("arcaea.message.user_unbound", prefix=msg.prefixes[0]))
|
||||||
|
|
||||||
|
|
||||||
@arc.command('song <songname> <prs|pst|ftr|byd> {{arcaea.song.help}}')
|
@arc.command('song <songname> <prs|pst|ftr|byd> {{arcaea.song.help}}')
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
"arcaea.rank.help.free": "View the current rank of the free packs.",
|
"arcaea.rank.help.free": "View the current rank of the free packs.",
|
||||||
"arcaea.rank.help.paid": "View the current rank of the paid packs.",
|
"arcaea.rank.help.paid": "View the current rank of the paid packs.",
|
||||||
"arcaea.help.desc": "Queries about Arcaea.",
|
"arcaea.help.desc": "Queries about Arcaea.",
|
||||||
"arcaea.message.sb616": "For obvious reasons, score-checking features of the \"arcaea\" module are disabled indefinitely.\nMen are mortal. Unfortunately, Guy's mom has passed away and can no longer answer you. She shall be always remembered.\n",
|
"arcaea.message.sb616": "\nP.S. Men are mortal. Unfortunately, Guy's mom has passed away and can no longer answer you. She shall be always remembered.\n",
|
||||||
"arcaea.errcode.-1": "Invalid username or friend ID",
|
"arcaea.errcode.-1": "Invalid username or friend ID",
|
||||||
"arcaea.errcode.-2": "Invalid friend ID",
|
"arcaea.errcode.-2": "Invalid friend ID",
|
||||||
"arcaea.errcode.-3": "User not found",
|
"arcaea.errcode.-3": "User not found",
|
||||||
|
@ -28,13 +28,13 @@
|
||||||
"arcaea.errcode.-20": "File does not exist",
|
"arcaea.errcode.-20": "File does not exist",
|
||||||
"arcaea.errcode.-23": "Internal error occurred",
|
"arcaea.errcode.-23": "Internal error occurred",
|
||||||
"arcaea.errcode.-233": "Unknown error occurred",
|
"arcaea.errcode.-233": "Unknown error occurred",
|
||||||
"arcaea.message.assets.not_found": "No resource files found! Please place the apk files of Arcaea to the robot's assets directory and rename them to \"arc.apk\", use \"${prefix}arcaea\" to initialize resources.",
|
"arcaea.message.assets.not_found": "No resource files found! Please place the apk files of Arcaea to the robot's \"assets\" directory and rename them to \"arc.apk\", use \"${prefix}arcaea\" to initialize resources.",
|
||||||
"arcaea.message.failed": "Failed to query.",
|
"arcaea.message.failed": "Failed to query.",
|
||||||
"arcaea.message.failed.errcode": "Failed to query: ",
|
"arcaea.message.failed.errcode": "Failed to query: ",
|
||||||
"arcaea.message.failed.fetch": "Failed to fetch.",
|
"arcaea.message.failed.fetch": "Failed to fetch.",
|
||||||
"arcaea.message.invalid.friendcode.format": "Please enter the correct friend ID!",
|
"arcaea.message.invalid.friendcode.format": "Please enter the correct friend ID!",
|
||||||
"arcaea.message.invalid.friendcode.non_digital": "Friend ID must be 9 digits!",
|
"arcaea.message.invalid.friendcode.non_digital": "Friend ID must be 9 digits!",
|
||||||
"arcaea.message.user.unbound": "Unbound user. Please bind user by \"${prefix}arcaea bind <friendcode>\".",
|
"arcaea.message.user_unbound": "Unbound user. Please bind user by \"${prefix}arcaea bind\".",
|
||||||
"arcaea.message.no_webrender": "No webrender configured, this command cannot be used.",
|
"arcaea.message.no_webrender": "No webrender configured, this command cannot be used.",
|
||||||
"arcaea.b30.help": "Query the best 30 list of Arcaea user. ",
|
"arcaea.b30.help": "Query the best 30 list of Arcaea user. ",
|
||||||
"arcaea.b30.message.wait": "已将查询提交给队列,请耐心等待…",
|
"arcaea.b30.message.wait": "已将查询提交给队列,请耐心等待…",
|
||||||
|
@ -71,6 +71,6 @@
|
||||||
"arcaea.bind.message.failed": "Binding failed, please try binding with your friend ID.",
|
"arcaea.bind.message.failed": "Binding failed, please try binding with your friend ID.",
|
||||||
"arcaea.unbind.help": "Unbind user.",
|
"arcaea.unbind.help": "Unbind user.",
|
||||||
"arcaea.unbind.message.success": "Unbind succeeded.",
|
"arcaea.unbind.message.success": "Unbind succeeded.",
|
||||||
"arcaea.initialize.message.not_found": "arc.apk not found!",
|
"arcaea.initialize.message.not_found": "\"arc.apk\" not found!",
|
||||||
"arcaea.initialize.message.success": "Initialized successed!"
|
"arcaea.initialize.message.success": "Initialized successed!"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
{
|
{
|
||||||
"arcaea.download.help": "获取最新版本的游戏 apk。",
|
"arcaea.download.help": "获取最新版本的游戏 Apk。",
|
||||||
"arcaea.download.message.success": "目前的最新版本为 ${version}。\n下载地址:${url}",
|
"arcaea.download.message.success": "目前的最新版本为 ${version}。\n下载地址:${url}",
|
||||||
"arcaea.random.help": "随机一首曲子。",
|
"arcaea.random.help": "随机一首曲子。",
|
||||||
"arcaea.rank.help.free": "查看当前免费包游玩排行。",
|
"arcaea.rank.help.free": "查看当前免费包游玩排行。",
|
||||||
"arcaea.rank.help.paid": "查看当前付费包游玩排行。",
|
"arcaea.rank.help.paid": "查看当前付费包游玩排行。",
|
||||||
"arcaea.help.desc": "查询 Arcaea 相关内容。",
|
"arcaea.help.desc": "查询 Arcaea 相关内容。",
|
||||||
"arcaea.message.sb616": "PS:人生自古谁无死?不幸地,Guy 的母亲已经逝世,因此无法继续与您互动,让我们永远缅怀她。",
|
"arcaea.message.sb616": "\nPS:人生自古谁无死?不幸地,Guy 的母亲已经逝世,因此无法继续与您互动,让我们永远缅怀她。",
|
||||||
"arcaea.errcode.-1": "非法的用户名或好友代码",
|
"arcaea.errcode.-1": "非法的用户名或好友代码",
|
||||||
"arcaea.errcode.-2": "非法的好友代码",
|
"arcaea.errcode.-2": "非法的好友代码",
|
||||||
"arcaea.errcode.-3": "未找到用户",
|
"arcaea.errcode.-3": "未找到用户",
|
||||||
|
@ -28,17 +28,17 @@
|
||||||
"arcaea.errcode.-20": "文件不存在",
|
"arcaea.errcode.-20": "文件不存在",
|
||||||
"arcaea.errcode.-23": "发生了内部错误",
|
"arcaea.errcode.-23": "发生了内部错误",
|
||||||
"arcaea.errcode.-233": "发生了未知错误",
|
"arcaea.errcode.-233": "发生了未知错误",
|
||||||
"arcaea.message.assets.not_found": "找不到资源文件!请放置一份 Arcaea 的 apk 文件到机器人的 assets 目录并重命名为 arc.apk 后,使用“${prefix}arcaea initialize”初始化资源。",
|
"arcaea.message.assets.not_found": "找不到资源文件!请放置一份 Arcaea 的 Apk 文件到机器人的“assets”目录并重命名为“arc.apk”后,使用“${prefix}arcaea initialize”初始化资源。",
|
||||||
"arcaea.message.failed": "查询失败。",
|
"arcaea.message.failed": "查询失败。",
|
||||||
"arcaea.message.failed.errcode": "查询失败:",
|
"arcaea.message.failed.errcode": "查询失败:",
|
||||||
"arcaea.message.failed.fetch": "获取失败。",
|
"arcaea.message.failed.fetch": "获取失败。",
|
||||||
"arcaea.message.invalid.friendcode.format": "请输入正确的好友 ID!",
|
"arcaea.message.invalid.friendcode.format": "请输入正确的好友 ID!",
|
||||||
"arcaea.message.invalid.friendcode.non_digital": "好友 ID 必须是 9 位数字!",
|
"arcaea.message.invalid.friendcode.non_digital": "好友 ID 必须是 9 位数字!",
|
||||||
"arcaea.message.user.unbound": "未绑定用户,请使用“${prefix}arcaea bind <friendcode>”绑定一个用户。",
|
"arcaea.message.user_unbound": "未绑定用户,请使用“${prefix}arcaea bind”绑定一个用户。",
|
||||||
"arcaea.message.no_webrender": "未配置 webrender,无法使用此命令。",
|
"arcaea.message.no_webrender": "未配置 Webrender,无法使用此命令。",
|
||||||
"arcaea.b30.help": "查询 Arcaea 用户的 b30 列表。",
|
"arcaea.b30.help": "查询 Arcaea 用户的 B30 列表。",
|
||||||
"arcaea.b30.message.wait": "已将查询提交给队列,请耐心等待…",
|
"arcaea.b30.message.wait": "已将查询提交给队列,请耐心等待…",
|
||||||
"arcaea.b30.message.wait.check": "当前查询用时较长,我们将在30分钟内每分钟检查一次返回的结果,请耐心等待…",
|
"arcaea.b30.message.wait.check": "当前查询用时较长,我们将在 30 分钟内每分钟检查一次返回的结果,请耐心等待…",
|
||||||
"arcaea.b30.message.wait.timeout": "查询超时,建议过一段时间后重试。",
|
"arcaea.b30.message.wait.timeout": "查询超时,建议过一段时间后重试。",
|
||||||
"arcaea.b30.message.wait.cached": "你已在 12 小时内提交过一次查询,将使用上次查询缓存的结果。",
|
"arcaea.b30.message.wait.cached": "你已在 12 小时内提交过一次查询,将使用上次查询缓存的结果。",
|
||||||
"arcaea.b30.message.wait.already": "我们正在执行你上次使用的命令中,稍安勿躁…",
|
"arcaea.b30.message.wait.already": "我们正在执行你上次使用的命令中,稍安勿躁…",
|
||||||
|
@ -72,6 +72,6 @@
|
||||||
"arcaea.bind.message.failed": "绑定失败,请尝试使用好友 ID 绑定。",
|
"arcaea.bind.message.failed": "绑定失败,请尝试使用好友 ID 绑定。",
|
||||||
"arcaea.unbind.help": "解绑用户。",
|
"arcaea.unbind.help": "解绑用户。",
|
||||||
"arcaea.unbind.message.success": "解绑成功。",
|
"arcaea.unbind.message.success": "解绑成功。",
|
||||||
"arcaea.initialize.message.not_found": "未找到 arc.apk!",
|
"arcaea.initialize.message.not_found": "未找到“arc.apk”!",
|
||||||
"arcaea.initialize.message.success": "成功初始化!"
|
"arcaea.initialize.message.success": "成功初始化!"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
{
|
{
|
||||||
"arcaea.download.help": "取得最新版本的遊戲 apk。",
|
"arcaea.download.help": "取得最新版本的遊戲 Apk。",
|
||||||
"arcaea.download.message.success": "目前的最新版本為 ${version}。\n下載網址:${url}",
|
"arcaea.download.message.success": "目前的最新版本為 ${version}。\n下載網址:${url}",
|
||||||
"arcaea.random.help": "隨機一首曲目。",
|
"arcaea.random.help": "隨機一首曲目。",
|
||||||
"arcaea.rank.help.free": "檢視目前免費包遊玩排行。",
|
"arcaea.rank.help.free": "檢視目前免費包遊玩排行。",
|
||||||
"arcaea.rank.help.paid": "檢視目前付費包遊玩排行。",
|
"arcaea.rank.help.paid": "檢視目前付費包遊玩排行。",
|
||||||
"arcaea.help.desc": "查詢 Arcaea 相關內容。",
|
"arcaea.help.desc": "查詢 Arcaea 相關內容。",
|
||||||
"arcaea.message.sb616": "PS:人生自古誰無死?不幸地,Guy 的母親已經逝世,因此無法繼續與您互動,讓我們永遠緬懷她。",
|
"arcaea.message.sb616": "\nPS:人生自古誰無死?不幸地,Guy 的母親已經逝世,因此無法繼續與您互動,讓我們永遠緬懷她。",
|
||||||
"arcaea.errcode.-1": "無效的使用者名稱或好友 ID",
|
"arcaea.errcode.-1": "無效的使用者名稱或好友 ID",
|
||||||
"arcaea.errcode.-2": "無效的好友 ID",
|
"arcaea.errcode.-2": "無效的好友 ID",
|
||||||
"arcaea.errcode.-3": "找不到使用者",
|
"arcaea.errcode.-3": "找不到使用者",
|
||||||
|
@ -28,15 +28,15 @@
|
||||||
"arcaea.errcode.-20": "檔案不存在",
|
"arcaea.errcode.-20": "檔案不存在",
|
||||||
"arcaea.errcode.-23": "發生了內部錯誤",
|
"arcaea.errcode.-23": "發生了內部錯誤",
|
||||||
"arcaea.errcode.-233": "發生了不明錯誤",
|
"arcaea.errcode.-233": "發生了不明錯誤",
|
||||||
"arcaea.message.assets.not_found": "找不到資源檔案! 請放置一份 Arcaea 的 apk 檔案到機器人的 assets 目錄並重命名為 arc.apk 後,使用「${prefix}arcaea initialize」初始化資源。",
|
"arcaea.message.assets.not_found": "找不到資源檔案! 請放置一份 Arcaea 的 Apk 檔案到機器人的「assets」目錄並重命名為「arc.apk」後,使用「${prefix}arcaea initialize」初始化資源。",
|
||||||
"arcaea.message.failed": "查詢失敗。",
|
"arcaea.message.failed": "查詢失敗。",
|
||||||
"arcaea.message.failed.errcode": "查詢失敗:",
|
"arcaea.message.failed.errcode": "查詢失敗:",
|
||||||
"arcaea.message.failed.fetch": "取得失敗。",
|
"arcaea.message.failed.fetch": "取得失敗。",
|
||||||
"arcaea.message.invalid.friendcode.format": "請輸入正確的好友 ID!",
|
"arcaea.message.invalid.friendcode.format": "請輸入正確的好友 ID!",
|
||||||
"arcaea.message.invalid.friendcode.non_digital": "好友 ID 必須為 9 位數字!",
|
"arcaea.message.invalid.friendcode.non_digital": "好友 ID 必須為 9 位數字!",
|
||||||
"arcaea.message.user.unbound": "未綁定使用者,請使用「${prefix}arcaea bind <friendcode>」綁定一個使用者。",
|
"arcaea.message.user_unbound": "未綁定使用者,請使用「${prefix}arcaea bind」綁定一個使用者。",
|
||||||
"arcaea.message.no_webrender": "未配置 webrender,無法使用此指令。",
|
"arcaea.message.no_webrender": "未配置 Webrender,無法使用此指令。",
|
||||||
"arcaea.b30.help": "查詢 Arcaea 使用者的 b30 列表。",
|
"arcaea.b30.help": "查詢 Arcaea 使用者的 B30 列表。",
|
||||||
"arcaea.b30.message.wait": "已将查询提交给队列,请耐心等待…",
|
"arcaea.b30.message.wait": "已将查询提交给队列,请耐心等待…",
|
||||||
"arcaea.b30.message.wait.check": "当前查询用时较长,我们将在30分钟内每分钟检查一次返回的结果,请耐心等待…",
|
"arcaea.b30.message.wait.check": "当前查询用时较长,我们将在30分钟内每分钟检查一次返回的结果,请耐心等待…",
|
||||||
"arcaea.b30.message.wait.timeout": "查询超时,建议过一段时间后重试。",
|
"arcaea.b30.message.wait.timeout": "查询超时,建议过一段时间后重试。",
|
||||||
|
@ -71,6 +71,6 @@
|
||||||
"arcaea.bind.message.failed": "綁定失敗,請嘗試使用好友 ID 綁定。",
|
"arcaea.bind.message.failed": "綁定失敗,請嘗試使用好友 ID 綁定。",
|
||||||
"arcaea.unbind.help": "解除綁定使用者。",
|
"arcaea.unbind.help": "解除綁定使用者。",
|
||||||
"arcaea.unbind.message.success": "解除綁定成功。",
|
"arcaea.unbind.message.success": "解除綁定成功。",
|
||||||
"arcaea.initialize.message.not_found": "找不到 arc.apk!",
|
"arcaea.initialize.message.not_found": "找不到「arc.apk」!",
|
||||||
"arcaea.initialize.message.success": "成功初始化!"
|
"arcaea.initialize.message.success": "成功初始化!"
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,7 @@ async def _(msg: Bot.MessageSession):
|
||||||
|
|
||||||
@cytoid.handle('bind <username> {{cytoid.bind.help}}')
|
@cytoid.handle('bind <username> {{cytoid.bind.help}}')
|
||||||
async def _(msg: Bot.MessageSession):
|
async def _(msg: Bot.MessageSession):
|
||||||
code: str = msg.parsed_msg['<username>']
|
code: str = lower(msg.parsed_msg['<username>'])
|
||||||
getcode = await get_profile_name(code)
|
getcode = await get_profile_name(code)
|
||||||
if getcode:
|
if getcode:
|
||||||
bind = CytoidBindInfoManager(msg).set_bind_info(username=getcode[0])
|
bind = CytoidBindInfoManager(msg).set_bind_info(username=getcode[0])
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
{
|
{
|
||||||
"cytoid.profile.help": "查询一个用户的基本信息。",
|
"cytoid.profile.help": "查询一个用户的基本信息。",
|
||||||
"cytoid.b30.help": "查询 Cytoid 用户的 b30/r30 列表。",
|
"cytoid.b30.help": "查询 Cytoid 用户的 B30/R30 列表。",
|
||||||
"cytoid.b30.message.cooldown": "距离上次执行已过去 ${time} 秒,本命令的冷却时间为 150 秒。(据官方人员所述,此 API 的调用十分昂贵,故手动做出这一限制,请谅解。)",
|
"cytoid.b30.message.cooldown": "距离上次执行已过去 ${time} 秒,本命令的冷却时间为 150 秒。(据官方人员所述,此 API 的调用十分昂贵,故手动做出这一限制,请谅解。)",
|
||||||
"cytoid.bind.help": "绑定 Cytoid 用户。",
|
"cytoid.bind.help": "绑定 Cytoid 用户。",
|
||||||
"cytoid.bind.message.success": "绑定成功:",
|
"cytoid.bind.message.success": "绑定成功:",
|
||||||
"cytoid.bind.message.failed": "绑定失败,请检查输入。",
|
"cytoid.bind.message.failed": "绑定失败,请检查输入。",
|
||||||
"cytoid.unbind.help": "解绑用户。",
|
"cytoid.unbind.help": "解绑用户。",
|
||||||
"cytoid.unbind.message.success": "解绑成功。",
|
"cytoid.unbind.message.success": "解绑成功。",
|
||||||
"cytoid.message.user.unbound": "未绑定用户,请使用“${prefix}cytoid bind <username>”绑定一个用户。",
|
"cytoid.message.user.unbound": "未绑定用户,请使用“${prefix}cytoid bind”绑定一个用户。",
|
||||||
"cytoid.message.user.not_found": "用户不存在。",
|
"cytoid.message.user.not_found": "用户不存在。",
|
||||||
"cytoid.message.error.user.not_found": "发生错误:此用户不存在。"
|
"cytoid.message.error.user.not_found": "发生错误:此用户不存在。"
|
||||||
}
|
}
|
|
@ -1,13 +1,13 @@
|
||||||
{
|
{
|
||||||
"cytoid.profile.help": "查询一个用户的基本信息。",
|
"cytoid.profile.help": "查询一个用户的基本信息。",
|
||||||
"cytoid.b30.help": "查询 Cytoid 用户的 b30/r30 列表。",
|
"cytoid.b30.help": "查询 Cytoid 用户的 B30/R30 列表。",
|
||||||
"cytoid.b30.message.cooldown": "距离上次执行已过去 ${time} 秒,本命令的冷却时间为 150 秒。(据官方人员所述,此 API 的调用十分昂贵,故手动做出这一限制,请谅解。)",
|
"cytoid.b30.message.cooldown": "距离上次执行已过去 ${time} 秒,本命令的冷却时间为 150 秒。(据官方人员所述,此 API 的调用十分昂贵,故手动做出这一限制,请谅解。)",
|
||||||
"cytoid.bind.help": "绑定 Cytoid 用户。",
|
"cytoid.bind.help": "绑定 Cytoid 用户。",
|
||||||
"cytoid.bind.message.success": "绑定成功:",
|
"cytoid.bind.message.success": "绑定成功:",
|
||||||
"cytoid.bind.message.failed": "绑定失败,请检查输入。",
|
"cytoid.bind.message.failed": "绑定失败,请检查输入。",
|
||||||
"cytoid.unbind.help": "解绑用户。",
|
"cytoid.unbind.help": "解绑用户。",
|
||||||
"cytoid.unbind.message.success": "解绑成功。",
|
"cytoid.unbind.message.success": "解绑成功。",
|
||||||
"cytoid.message.user.unbound": "未绑定用户,请使用“${prefix}cytoid bind <username>”绑定一个用户。",
|
"cytoid.message.user.unbound": "未绑定用户,请使用“${prefix}cytoid bind”绑定一个用户。",
|
||||||
"cytoid.message.user.not_found": "用户不存在。",
|
"cytoid.message.user.not_found": "用户不存在。",
|
||||||
"cytoid.message.error.user.not_found": "发生错误:此用户不存在。"
|
"cytoid.message.error.user.not_found": "发生错误:此用户不存在。"
|
||||||
}
|
}
|
|
@ -1,13 +1,13 @@
|
||||||
{
|
{
|
||||||
"cytoid.profile.help": "查詢一個使用者的基本資訊。",
|
"cytoid.profile.help": "查詢一個使用者的基本資訊。",
|
||||||
"cytoid.b30.help": "查詢 Cytoid 使用者的 b30/r30 列表。",
|
"cytoid.b30.help": "查詢 Cytoid 使用者的 B30/R30 列表。",
|
||||||
"cytoid.b30.message.cooldown": "距离上次执行已过去 ${time} 秒,本命令的冷却时间为 150 秒。(据官方人员所述,此 API 的调用十分昂贵,故手动做出这一限制,请谅解。)",
|
"cytoid.b30.message.cooldown": "距离上次执行已过去 ${time} 秒,本命令的冷却时间为 150 秒。(据官方人员所述,此 API 的调用十分昂贵,故手动做出这一限制,请谅解。)",
|
||||||
"cytoid.bind.help": "绑定 Cytoid 使用者。",
|
"cytoid.bind.help": "绑定 Cytoid 使用者。",
|
||||||
"cytoid.bind.message.success": "綁定成功。",
|
"cytoid.bind.message.success": "綁定成功。",
|
||||||
"cytoid.bind.message.failed": "綁定失敗,請檢查輸入。",
|
"cytoid.bind.message.failed": "綁定失敗,請檢查輸入。",
|
||||||
"cytoid.unbind.help": "解除綁定使用者。",
|
"cytoid.unbind.help": "解除綁定使用者。",
|
||||||
"cytoid.unbind.message.success": "解除綁定成功。",
|
"cytoid.unbind.message.success": "解除綁定成功。",
|
||||||
"cytoid.message.user.unbound": "未綁定使用者,請使用「${prefix}cytoid bind <username>」綁定一個使用者。",
|
"cytoid.message.user.unbound": "未綁定使用者,請使用「${prefix}cytoid bind」綁定一個使用者。",
|
||||||
"cytoid.message.user.not_found": "使用者不存在。",
|
"cytoid.message.user.not_found": "使用者不存在。",
|
||||||
"cytoid.message.error.user.not_found": "發生錯誤:此使用者不存在。"
|
"cytoid.message.error.user.not_found": "發生錯誤:此使用者不存在。"
|
||||||
}
|
}
|
|
@ -7,7 +7,7 @@ from .dbutils import CytoidBindInfoManager
|
||||||
|
|
||||||
|
|
||||||
async def cytoid_profile(msg: Bot.MessageSession):
|
async def cytoid_profile(msg: Bot.MessageSession):
|
||||||
pat = msg.parsed_msg.get('<UserID>', False)
|
pat = lower(msg.parsed_msg.get('<UserID>', False))
|
||||||
if pat:
|
if pat:
|
||||||
query_id = pat
|
query_id = pat
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -14,41 +14,39 @@ from .dbutils import PgrBindInfoManager
|
||||||
from .update import update_difficulty_csv, update_assets
|
from .update import update_difficulty_csv, update_assets
|
||||||
from .genb19 import drawb19
|
from .genb19 import drawb19
|
||||||
|
|
||||||
phi = module('phigros', developers=['OasisAkari'], desc='查询 Phigros 相关内容。SessionToken获取参考:'
|
phi = module('phigros', developers=['OasisAkari'], desc='{phigros.help.desc}',
|
||||||
'https://mivik.gitee.io/pgr-bot-help/index.html#%E5%AE%89%E5%8D%93',
|
|
||||||
alias={'p': 'phigros', 'pgr': 'phigros', 'phi': 'phigros'})
|
alias={'p': 'phigros', 'pgr': 'phigros', 'phi': 'phigros'})
|
||||||
|
|
||||||
|
|
||||||
@phi.command('bind <sessiontoken> {使用云存档SessionToken绑定一个账户。(请在私聊绑定账户)}')
|
@phi.command('bind <sessiontoken> {{phigros.help.bind}}')
|
||||||
async def _(msg: Bot.MessageSession):
|
async def _(msg: Bot.MessageSession):
|
||||||
need_revoke = False
|
need_revoke = False
|
||||||
send_msg = []
|
send_msg = []
|
||||||
if msg.target.targetFrom in ['QQ|Group', 'QQ|Guild', 'Discord|Channel', 'Telegram|group', 'Telegram|supergroup']:
|
if msg.target.targetFrom in ['QQ|Group', 'QQ|Guild', 'Discord|Channel', 'Telegram|group', 'Telegram|supergroup']:
|
||||||
send_msg.append(await msg.sendMessage('警告:您正在群组中绑定账户,这有可能会使您的账户云存档数据被他人篡改。请尽量使用私聊绑定账户以避免这种情况。\n'
|
send_msg.append(await msg.sendMessage(msg.locale.t("phigros.bind.message.warning")))
|
||||||
'您可以通过重新登录重置SessionToken,此次命令产生的消息将在15秒后撤回。'))
|
|
||||||
need_revoke = True
|
need_revoke = True
|
||||||
token: str = msg.parsed_msg['<sessiontoken>']
|
token: str = msg.parsed_msg['<sessiontoken>']
|
||||||
bind = PgrBindInfoManager(msg).set_bind_info(sessiontoken=token)
|
bind = PgrBindInfoManager(msg).set_bind_info(sessiontoken=token)
|
||||||
if bind:
|
if bind:
|
||||||
send_msg.append(await msg.sendMessage("成功绑定账户。"))
|
send_msg.append(await msg.sendMessage(msg.locale.t("phigros.bind.message.success")))
|
||||||
if need_revoke:
|
if need_revoke:
|
||||||
await msg.sleep(15)
|
await msg.sleep(15)
|
||||||
for i in send_msg:
|
for i in send_msg:
|
||||||
await i.delete()
|
await i.delete()
|
||||||
|
|
||||||
|
|
||||||
@phi.command('unbind {取消绑定账户。}')
|
@phi.command('unbind {{phigros.unbind.help}}')
|
||||||
async def _(msg: Bot.MessageSession):
|
async def _(msg: Bot.MessageSession):
|
||||||
unbind = PgrBindInfoManager(msg).remove_bind_info()
|
unbind = PgrBindInfoManager(msg).remove_bind_info()
|
||||||
if unbind:
|
if unbind:
|
||||||
await msg.finish("成功取消绑定账户。")
|
await msg.finish(msg.locale.t("phigros.unbind.message.success"))
|
||||||
|
|
||||||
|
|
||||||
@phi.command('b19 {查询B19信息。}')
|
@phi.command('b19 {{phigros.b19.help}}')
|
||||||
async def _(msg: Bot.MessageSession):
|
async def _(msg: Bot.MessageSession):
|
||||||
bind = PgrBindInfoManager(msg).get_bind_sessiontoken()
|
bind = PgrBindInfoManager(msg).get_bind_sessiontoken()
|
||||||
if bind is None:
|
if bind is None:
|
||||||
await msg.finish("您还未绑定账户。")
|
await msg.finish(msg.locale.t("phigros.message.user_unbound"))
|
||||||
else:
|
else:
|
||||||
transport = TTransport.TBufferedTransport(TSocket.TSocket())
|
transport = TTransport.TBufferedTransport(TSocket.TSocket())
|
||||||
protocol = TBinaryProtocol.TBinaryProtocol(transport)
|
protocol = TBinaryProtocol.TBinaryProtocol(transport)
|
||||||
|
@ -57,20 +55,20 @@ async def _(msg: Bot.MessageSession):
|
||||||
saveurl = client.getSaveUrl(bind)
|
saveurl = client.getSaveUrl(bind)
|
||||||
result = client.best19(saveurl.saveUrl)
|
result = client.best19(saveurl.saveUrl)
|
||||||
transport.close()
|
transport.close()
|
||||||
await msg.sendMessage([Plain('查询结果:\n'), Image(drawb19('', result))])
|
await msg.sendMessage(Image(drawb19('', result)))
|
||||||
|
|
||||||
|
|
||||||
@phi.command('update assets')
|
@phi.command('update assets')
|
||||||
async def _(msg: Bot.MessageSession):
|
async def _(msg: Bot.MessageSession):
|
||||||
update_ = await update_assets()
|
update_ = await update_assets()
|
||||||
if update_:
|
if update_:
|
||||||
await msg.finish("更新成功。")
|
await msg.finish(msg.locale.t("phigros.message.update.success"))
|
||||||
|
|
||||||
|
|
||||||
@phi.command('update rating')
|
@phi.command('update rating')
|
||||||
async def _(msg: Bot.MessageSession):
|
async def _(msg: Bot.MessageSession):
|
||||||
update_ = await update_difficulty_csv()
|
update_ = await update_difficulty_csv()
|
||||||
if update_:
|
if update_:
|
||||||
await msg.finish("更新成功。")
|
await msg.finish(msg.locale.t("phigros.message.update.success"))
|
||||||
|
|
||||||
|
|
||||||
|
|
11
modules/phigros/locales/zh_cn.json
Normal file
11
modules/phigros/locales/zh_cn.json
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
"phigros.help.desc": "查询 Phigros 相关内容。",
|
||||||
|
"phigros.help.bind": "使用云存档 SessionToken 绑定用户,建议私聊使用。",
|
||||||
|
"phigros.bind.message.warning": "警告:您正在群组中绑定用户,这有可能会使您的用户云存档数据被他人篡改。请尽量私聊绑定用户以避免这种情况。\n您可以通过重新登录来重置 SessionToken。此次命令产生的消息将在 15 秒后撤回。",
|
||||||
|
"phigros.bind.message.success": "绑定成功。",
|
||||||
|
"phigros.unbind.help": "解绑用户。",
|
||||||
|
"phigros.unbind.message.success": "解绑成功。",
|
||||||
|
"phigros.b19.help": "查询 B19 列表。",
|
||||||
|
"phigros.message.user_unbound": "未绑定用户,请使用「${prefix}phigros bind」绑定一个用户。",
|
||||||
|
"phigros.message.update.success": "更新成功。"
|
||||||
|
}
|
|
@ -154,23 +154,28 @@ async def _(msg: Bot.MessageSession):
|
||||||
await msg.finish(msg.locale.t("wiki.prefix.reset.message.success"))
|
await msg.finish(msg.locale.t("wiki.prefix.reset.message.success"))
|
||||||
|
|
||||||
|
|
||||||
@wiki.handle('fandom enable {{wiki.fandom.enable.help}}', 'fandom disable {{wiki.fandom.disable.help}}',
|
@wiki.handle('fandom {{wiki.fandom.enable.help}}',
|
||||||
required_admin=True)
|
required_admin=True)
|
||||||
async def _(msg: Bot.MessageSession):
|
async def _(msg: Bot.MessageSession):
|
||||||
if msg.parsed_msg.get('enable', False):
|
|
||||||
msg.data.edit_option('wiki_fandom_addon', True)
|
fandom_addon_state = msg.data.edit_option('wiki_fandom_addon', False)
|
||||||
await msg.finish(msg.locale.t("wiki.fandom.enable.message"))
|
|
||||||
else:
|
if fandom_addon_state:
|
||||||
msg.data.edit_option('wiki_fandom_addon', False)
|
msg.data.edit_option('wiki_fandom_addon', False)
|
||||||
await msg.finish(msg.locale.t("wiki.fandom.disable.message"))
|
await msg.finish(msg.locale.t("wiki.fandom.disable.message"))
|
||||||
|
else:
|
||||||
|
msg.data.edit_option('wiki_fandom_addon', True)
|
||||||
|
await msg.finish(msg.locale.t("wiki.fandom.enable.message"))
|
||||||
|
|
||||||
|
|
||||||
@wiki.handle('redlink enable {{wiki.redlink.enable.help}}', 'redlink disable {{wiki.redlink.disable.help}}',
|
@wiki.handle('redlink {{wiki.redlink.enable.help}}',
|
||||||
required_admin=True)
|
required_admin=True)
|
||||||
async def _(msg: Bot.MessageSession):
|
async def _(msg: Bot.MessageSession):
|
||||||
if msg.parsed_msg.get('enable', False):
|
redlink_state = msg.data.edit_option('wiki_redlink', False)
|
||||||
msg.data.edit_option('wiki_redlink', True)
|
|
||||||
await msg.finish(msg.locale.t("wiki.redlink.enable.message"))
|
if redlink_state:
|
||||||
else:
|
|
||||||
msg.data.edit_option('wiki_redlink', False)
|
msg.data.edit_option('wiki_redlink', False)
|
||||||
await msg.finish(msg.locale.t("wiki.redlink.disable.message"))
|
await msg.finish(msg.locale.t("wiki.redlink.disable.message"))
|
||||||
|
else:
|
||||||
|
msg.data.edit_option('wiki_redlink', True)
|
||||||
|
await msg.finish(msg.locale.t("wiki.redlink.enable.message"))
|
||||||
|
|
Reference in a new issue