help.go 1.2 KB

1234567891011121314151617181920212223242526272829
  1. package handler
  2. import (
  3. tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api"
  4. )
  5. func getHelp() (help string) {
  6. // TODO separate help variable
  7. help = "This is bot tracks your miner stats and calculates unpaid per worker.\n"
  8. help += "How to start:\n"
  9. help += "1) \"/start\" - it will add you to database\n"
  10. help += "2) \"/setwallet <wallet>\" - it will set wallet for tracking, bot will start to add info about your miner and workers to database\n"
  11. help += "3) \"/actual\" - it will send you up to date data about your worker\n"
  12. help += "4) \"/lastpayout\" - it will send you last payout data with calculated worker unpaid for that period if avaliable\n"
  13. help += "5) \"/stop\" - it will clear all data about you from database\n"
  14. help += "Additional commands:\n"
  15. help += "\"/rate\" - get actual ETH and BTC rate from ethermine\n"
  16. help += "\"/actual <wallet>\" - get up to date data about any wallet without unpaid per worker\n"
  17. return help
  18. }
  19. func (ah ActionHandler) GetHelpHandler(chatId int64, params []string) []tgbotapi.MessageConfig {
  20. if len(params) != 0 {
  21. return []tgbotapi.MessageConfig{tgbotapi.NewMessage(chatId, "usage: /help")}
  22. }
  23. return []tgbotapi.MessageConfig{
  24. tgbotapi.NewMessage(chatId, getHelp())}
  25. }