add logout time and refactor
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@ -70,6 +70,7 @@ const (
|
||||
emojiDeaths = "\xF0\x9F\x92\x80"
|
||||
emojiTime = "\xF0\x9F\x95\x90"
|
||||
emojiGun = "\xF0\x9F\x94\xAB"
|
||||
emojiCheck = "\xE2\x9C\x85"
|
||||
)
|
||||
|
||||
func (p *playerInfo) updatePlayerInfo(ctx context.Context) error {
|
||||
@ -89,9 +90,9 @@ func (p *playerInfo) updatePlayerInfo(ctx context.Context) error {
|
||||
return err
|
||||
}
|
||||
|
||||
access := "\xE2\x9D\x8C offLine"
|
||||
access := "\x1F\x53\x04 offLine"
|
||||
if p.isOnline {
|
||||
access = "\xE2\x9C\x85 onLine"
|
||||
access = "\x1F\x7E\x02 onLine"
|
||||
}
|
||||
|
||||
level := "-"
|
||||
@ -111,6 +112,11 @@ func (p *playerInfo) updatePlayerInfo(ctx context.Context) error {
|
||||
lines = append(lines, fmt.Sprintf("%s Смертей: *%d*", emojiDeaths, player.deaths))
|
||||
lines = append(lines, fmt.Sprintf("%s Фрагов: *%d*", emojiGun, kills))
|
||||
lines = append(lines, fmt.Sprintf("%s Время в игре: *%s*", emojiTime, d.Format(units)))
|
||||
|
||||
if !player.lastLogout.IsZero() && !p.isOnline {
|
||||
lines = append(lines, fmt.Sprintf("%s Был в сети: *%s*", emojiCheck, player.lastLogout.Format("02 Jan 15:04")))
|
||||
}
|
||||
|
||||
lines = append(lines, "-----")
|
||||
|
||||
emojiAch := make([]string, 0, len(p.achievements))
|
||||
|
Reference in New Issue
Block a user