-
Notifications
You must be signed in to change notification settings - Fork 0
/
help.go
33 lines (29 loc) · 1.71 KB
/
help.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package main
import (
"fmt"
"strings"
tb "gopkg.in/tucnak/telebot.v2"
)
func getHelp(message *tb.Message) {
var sb strings.Builder
sb.WriteString("<strong>cosmos-interacter</strong>\n\n")
sb.WriteString(fmt.Sprintf("Query for the %s network info.\n", NetworkName))
sb.WriteString("Can understand the following commands:\n")
sb.WriteString("- /wallet <wallet address> - get the wallet info (balance, delegated amount, rewards etc.)\n")
sb.WriteString("- /validator <validator address or name> - get validator info\n")
sb.WriteString("- /rate - get the Coingecko exchange rate to USD\n")
sb.WriteString("- /proposal <proposal ID> - get the proposal info\n")
sb.WriteString("- /proposals - proposals list\n")
sb.WriteString("- /wenblock <block ID> - gets the approximate block generation time (or the actual one, if the block was generated already)\n")
sb.WriteString("- /help - display this message\n")
sb.WriteString("- /about - get info about this bot and its creators\n\n")
sb.WriteString("<strong>Useful links:</strong>\n")
sb.WriteString(fmt.Sprintf("<a href=\"https://mintscan.io/%s\">Mintscan</a> - the network explorer powered by Cosmostation\n", MintscanPrefix))
sb.WriteString(fmt.Sprintf("<a href=\"https://www.coingecko.com/en/coins/%s\">Coingecko</a> - Coingecko exchange rate\n", CoingeckoCurrency))
sb.WriteString("<a href=\"https://play.google.com/store/apps/details?id=wannabit.io.cosmostaion\">Cosmostation Wallet for Android</a>\n")
sb.WriteString("<a href=\"https://apps.apple.com/us/app/cosmostation/id1459830339\">Cosmostation Wallet for iOS</a>\n")
sendMessage(message, sb.String())
log.Info().
Str("user", message.Sender.Username).
Msg("Successfully returned help info")
}