Skip to content

Commit

Permalink
fix: 成就统计的错误输出
Browse files Browse the repository at this point in the history
  • Loading branch information
XasYer committed Dec 17, 2024
1 parent 953f678 commit 80b643f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/achievement.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ export const rule = {
}
e.reply(['在查了...在查了...'])
// 先获取游戏的成就列表
const achievementsByGame = await api.ISteamUserStats.GetSchemaForGame(appid)
const achievementsByGame = await api.ISteamUserStats.GetSchemaForGame(appid).catch(() => {})
if (!achievementsByGame || !achievementsByGame.availableGameStats) {
await e.reply([segment.at(uid), `\n没有找到${appid}的成就信息`])
return true
}
const achievementsByUser = await api.ISteamUserStats.GetUserStatsForGame(appid, steamId)
const achievementsByUser = await api.ISteamUserStats.GetUserStatsForGame(appid, steamId).catch(() => {})
if (!achievementsByUser || !achievementsByUser.achievements) {
await e.reply([segment.at(uid), `\n没有找到${steamId}${appid}的成就信息`])
return true
Expand Down

0 comments on commit 80b643f

Please sign in to comment.