Skip to content

Commit

Permalink
fix: #steam不能at & 库存没有要查询的成就的游戏
Browse files Browse the repository at this point in the history
  • Loading branch information
XasYer committed Dec 17, 2024
1 parent 8ec47cb commit 953f678
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion apps/achievement.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const rule = {
return true
}
const achievementsByUser = await api.ISteamUserStats.GetUserStatsForGame(appid, steamId)
if (!achievementsByUser) {
if (!achievementsByUser || !achievementsByUser.achievements) {
await e.reply([segment.at(uid), `\n没有找到${steamId}${appid}的成就信息`])
return true
}
Expand Down
2 changes: 1 addition & 1 deletion apps/bind.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const app = {
export const rule = {
getBindImg: {
reg: /^#steam$/i,
fnc: async e => await e.reply(await bind.getBindSteamIdsImg(e.self_id, e.user_id, e.group_id))
fnc: async e => await e.reply(await bind.getBindSteamIdsImg(e.self_id, utils.getAtUid(e.at, e.user_id), e.group_id))
},
bind: {
reg: /^#?steam(?:[切更]换)?(?:绑定|bind)\s*(\d+)?$/i,
Expand Down
4 changes: 2 additions & 2 deletions models/bind/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import { db, utils, api } from '#models'
import { Config, Render } from '#components'

/**
* 获得已绑定的steamId的文本
* 获得已绑定的steamId的图片
* @param {string} uid
* @param {string} gid
* @param {UserColumns[]?} userBindAll
* @returns
* @returns {Promise<Object>}
*/
export async function getBindSteamIdsImg (bid, uid, gid, userBindAll = []) {
if (!userBindAll?.length) {
Expand Down

0 comments on commit 953f678

Please sign in to comment.