Skip to content

Commit 8236bb3

Browse files
committed
Fix recent command update
1 parent d4da7e3 commit 8236bb3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bot/recent.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ func (r recentCmdSort) Swap(i, j int) {
2828

2929
func updateRecentCommand(command string) {
3030
exists := false
31-
for _, v := range recentCmds {
31+
for idx, v := range recentCmds {
3232
if v.command == command {
33-
v.t = time.Now()
33+
recentCmds[idx].t = time.Now()
3434
exists = true
3535
break
3636
}

0 commit comments

Comments
 (0)