fix drone CI, fix markdown in kill message
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

This commit is contained in:
smsteel 2021-06-24 18:56:43 +03:00
parent 90a86fc18b
commit 36055c61a8
2 changed files with 12 additions and 1 deletions

View File

@ -15,7 +15,13 @@ steps:
- name: install - name: install
commands: commands:
- make install - make install
when:
branch:
- master
- name: restart - name: restart
commands: commands:
- systemctl restart craft-bot - systemctl restart craft-bot
when:
branch:
- master

View File

@ -47,7 +47,12 @@ func (fms *fragMessages) addFrag(ctx context.Context, playerName string, entityN
if fm.playerName == playerName && fm.entityName == entityName { if fm.playerName == playerName && fm.entityName == entityName {
mc.resetTimer(fm.messageID, fm.chatID, time.Second*30) mc.resetTimer(fm.messageID, fm.chatID, time.Second*30)
fm.increaseFrag() fm.increaseFrag()
mess := tgbotapi.NewEditMessageText(fm.chatID, fm.messageID, fmt.Sprintf("%s убил %s x *%d*", fm.playerName, fm.entityName, fm.fragCount)) mess := tgbotapi.NewEditMessageText(
fm.chatID,
fm.messageID,
fmt.Sprintf("%s убил %s ✗ *%d*", fm.playerName, fm.entityName, fm.fragCount),
)
mess.ParseMode = tgbotapi.ModeMarkdown
_, err := botApi.Send(mess) _, err := botApi.Send(mess)
if err != nil { if err != nil {
return err return err