Skip to content

Commit

Permalink
fix: 推送状态背景颜色
Browse files Browse the repository at this point in the history
  • Loading branch information
XasYer committed Jan 1, 2025
1 parent dadeda3 commit 34f93e8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions models/task/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export function startTimer () {
desc: `已${utils.steam.getPersonaState(player.personastate)}`,
image: await utils.bot.getUserAvatar(i.botId, i.userId, i.groupId) || (Config.other.steamAvatar ? i.avatarfull : ''),
isAvatar: true,
descStyle: `style="background-color: #${getColor(player.personastate)};color: white;width: fit-content;border-radius: 5px; padding: 0 5px;"`
descBgColor: getColor(i.personastate)
})
if (player.personastate === 0) {
db.StatsTableUpdate(i.userId, i.groupId, i.botId, i.steamId, player.gameid, player.gameextrainfo, 'onlineTime', time).catch(e => logger.error('更新统计数据失败', e.message))
Expand Down Expand Up @@ -181,10 +181,10 @@ export function startTimer () {
function getColor (state) {
switch (Number(state)) {
case 1:
return 'beee11'
return '#beee11'
case 0:
return '999999'
return '#999999'
default:
return '8fbc8b'
return '#8fbc8b'
}
}

0 comments on commit 34f93e8

Please sign in to comment.