some fixes and changes

This commit is contained in:
2026-02-17 17:35:34 +03:00
parent 598bc24b3a
commit dd83373689
10 changed files with 158 additions and 85 deletions

View File

@@ -6,7 +6,6 @@ import (
"kurumibot/utils"
"math"
"math/rand/v2"
"runtime"
"strconv"
"strings"
"time"
@@ -27,8 +26,6 @@ func RegisterEconomy(bot *laniakea.Bot) {
economy.Command(aboutGroup, "group", "о группе")
economy.Command(about, "about", "о боте")
bot.AddRunner(laniakea.NewRunner(
"economy.PassiveIncome", passiveIncome,
).Timeout(time.Minute).Build())
@@ -36,16 +33,6 @@ func RegisterEconomy(bot *laniakea.Bot) {
bot.AddPlugins(economy.Build())
}
func about(ctx *laniakea.MsgContext, _ *laniakea.DatabaseContext) {
out := []string{
fmt.Sprintf("Версия Go: %s", runtime.Version()[2:]),
fmt.Sprintf("Версия Laniakea: %s", laniakea.VersionString),
fmt.Sprintf("Время сборки: %s", utils.BuildTime),
fmt.Sprintf("Git хеш: %s", utils.GitCommit),
}
ctx.Answer(strings.Join(out, "\n"))
}
func passiveIncome(b *laniakea.Bot) error {
ctx := b.GetDBContext()
waifuRep := psql.NewWaifuRepository(ctx)