small fixes
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Timofey.Kovalev 2021-06-22 20:25:34 +03:00
parent 34c5271a62
commit a57abdd94d
2 changed files with 10 additions and 9 deletions

View File

@ -145,7 +145,6 @@ func (db *dbLayer) getPlayerByID(ctx context.Context, id string) (*Player, error
} }
return &p, nil return &p, nil
} }
func (db *dbLayer) getPlayerByName(ctx context.Context, name string) (*Player, error) { func (db *dbLayer) getPlayerByName(ctx context.Context, name string) (*Player, error) {

View File

@ -90,9 +90,9 @@ func (p *playerInfo) updatePlayerInfo(ctx context.Context) error {
return err return err
} }
access := "\x1F\x53\x04 offLine" access := "\xF0\x9F\x94\xB4 *offLine*"
if p.isOnline { if p.isOnline {
access = "\x1F\x7E\x02 onLine" access = "\xF0\x9F\x9F\xA2 *onLine*"
} }
level := "-" level := "-"
@ -117,6 +117,7 @@ func (p *playerInfo) updatePlayerInfo(ctx context.Context) error {
lines = append(lines, fmt.Sprintf("%s Был в сети: *%s*", emojiCheck, player.lastLogout.Format("02 Jan 15:04"))) lines = append(lines, fmt.Sprintf("%s Был в сети: *%s*", emojiCheck, player.lastLogout.Format("02 Jan 15:04")))
} }
if len(p.achievements) > 0 {
lines = append(lines, "-----") lines = append(lines, "-----")
emojiAch := make([]string, 0, len(p.achievements)) emojiAch := make([]string, 0, len(p.achievements))
@ -126,6 +127,7 @@ func (p *playerInfo) updatePlayerInfo(ctx context.Context) error {
} }
lines = append(lines, strings.Join(emojiAch, " ")) lines = append(lines, strings.Join(emojiAch, " "))
}
text := strings.Join(lines, "\n") text := strings.Join(lines, "\n")