Skip to content

Commit

Permalink
main: improve death notification on tg
Browse files Browse the repository at this point in the history
  • Loading branch information
uditkarode committed Nov 6, 2020
1 parent 93fee6e commit 3dafb64
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 0 additions & 2 deletions .idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,8 @@ func main() {
} else if deathRegex.MatchString(m) {
result := simpleOutputRegex.FindStringSubmatch(m)
if len(result) == 2 {
_, _ = b.Send(targetChat, result[1]+".", "Markdown")
sep := strings.Split(result[1], " ")
_, _ = b.Send(targetChat, "`"+sep[0]+"` "+strings.Join(sep[1:], " ")+".", "Markdown")
}
} else if strings.Contains(m, "For help, type") {
cliExec(stdin, "/say Server initialised!")
Expand Down

0 comments on commit 3dafb64

Please sign in to comment.