Skip to content

Commit 051b9a3

Browse files
committed
πŸ› δΌ˜εŒ–εη‰‡ι€»θΎ‘
1 parent 1d69f80 commit 051b9a3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

β€Žplugin/chatcount/chatcount.goβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func init() {
5050
text.WriteString("第")
5151
text.WriteString(strconv.Itoa(i + 1))
5252
text.WriteString("名:")
53-
text.WriteString(ctx.GetGroupMemberInfo(ctx.Event.GroupID, chatTimeList[i].UserID, false).Get("nickname").Str)
53+
text.WriteString(ctx.CardOrNickName(chatTimeList[i].UserID))
5454
text.WriteString(" - ")
5555
text.WriteString(strconv.FormatInt(chatTimeList[i].TodayTime/60, 10))
5656
text.WriteString("εˆ†ι’Ÿ\n")

β€Žplugin/chatcount/model.goβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ func (ctdb *chattimedb) updateChatTime(gid, uid int64) (todayTime int64, remindF
105105
func (ctdb *chattimedb) getChatTime(gid, uid int64) (todayTime int64, totalTime int64) {
106106
db := (*gorm.DB)(ctdb)
107107
st := ChatTime{}
108-
_ = db.Model(&ChatTime{}).Where("group_id = ? and user_id = ?", gid, uid).First(&st)
108+
db.Model(&ChatTime{}).Where("group_id = ? and user_id = ?", gid, uid).First(&st)
109109
todayTime = st.TodayTime / 60
110110
totalTime = st.TotalTime / 60
111111
return
@@ -114,7 +114,7 @@ func (ctdb *chattimedb) getChatTime(gid, uid int64) (todayTime int64, totalTime
114114
// getChatRank θŽ·εΎ—ζ°΄ηΎ€ζŽ’ε
115115
func (ctdb *chattimedb) getChatRank(gid int64) (chatTimeList []ChatTime) {
116116
db := (*gorm.DB)(ctdb)
117-
_ = db.Model(&ChatTime{}).Where("group_id = ?", gid).Order("today_time DESC").Find(&chatTimeList)
117+
db.Model(&ChatTime{}).Where("group_id = ?", gid).Order("today_time DESC").Find(&chatTimeList)
118118
return
119119
}
120120

0 commit comments

Comments
Β (0)