feat: add translate command

This commit is contained in:
Yiyang Kang 2023-03-08 02:28:26 +08:00
parent eecbaf18b3
commit 899491e867
Signed by: kkyy
GPG key ID: 80FD317ECAF06CC3
9 changed files with 236 additions and 9 deletions

View file

@ -6,10 +6,10 @@ import (
"syscall"
"time"
"git.gensokyo.cafe/kkyy/mycurrencynet"
"go.uber.org/zap"
tele "gopkg.in/telebot.v3"
"git.gensokyo.cafe/kkyy/mycurrencynet"
"git.gensokyo.cafe/kkyy/tgbot_misaka_5882f7/utils"
)
@ -55,10 +55,11 @@ func runBot() {
logger.Info("Announcing commands...")
if err = bot.SetCommands([]tele.Command{
{Text: "tr", Description: "Translate text"},
{Text: "xr", Description: "Currency exchange rates"},
{Text: "year_progress", Description: "Time doesn't wait."},
{Text: "traffic", Description: "Show traffic usage."},
{Text: "dig", Description: "Diggy diggy dig."},
{Text: "year_progress", Description: "Time doesn't wait."},
{Text: "xr", Description: "Currency exchange rates"},
}); err != nil {
logger.Fatalw("Failed to announce commands", "err", err)
}