laniakea v0.6
This commit is contained in:
@@ -15,22 +15,29 @@ import (
|
||||
)
|
||||
|
||||
func RegisterEconomy(bot *laniakea.Bot) {
|
||||
economy := laniakea.NewPlugin("Economy")
|
||||
economy.Command(profile, "profile", "профиль")
|
||||
economy.Command(work, "work", "работать")
|
||||
economy.Command(collect, "collect", "собрать")
|
||||
economy.Command(code, "code", "код")
|
||||
p := laniakea.NewPlugin("Economy")
|
||||
p.AddCommand(p.NewCommand(profile, "profile"))
|
||||
p.AddCommand(p.NewCommand(profile, "профиль").SkipCommandAutoGen())
|
||||
p.AddCommand(p.NewCommand(work, "work"))
|
||||
p.AddCommand(p.NewCommand(work, "работать").SkipCommandAutoGen())
|
||||
p.AddCommand(p.NewCommand(collect, "collect"))
|
||||
p.AddCommand(p.NewCommand(collect, "собрать").SkipCommandAutoGen())
|
||||
p.AddCommand(p.NewCommand(code, "code"))
|
||||
p.AddCommand(p.NewCommand(code, "код").SkipCommandAutoGen())
|
||||
|
||||
economy.Command(vacancies, "vacancies", "вакансии")
|
||||
economy.Command(getAJob, "getajob", "устроиться")
|
||||
p.AddCommand(p.NewCommand(vacancies, "vacancies"))
|
||||
p.AddCommand(p.NewCommand(vacancies, "вакансии").SkipCommandAutoGen())
|
||||
p.AddCommand(p.NewCommand(getAJob, "getajob"))
|
||||
p.AddCommand(p.NewCommand(getAJob, "устроиться").SkipCommandAutoGen())
|
||||
|
||||
economy.Command(aboutGroup, "group", "о группе")
|
||||
p.AddCommand(p.NewCommand(aboutGroup, "group"))
|
||||
p.AddCommand(p.NewCommand(aboutGroup, "о группе").SkipCommandAutoGen())
|
||||
|
||||
bot.AddRunner(laniakea.NewRunner(
|
||||
"economy.PassiveIncome", passiveIncome,
|
||||
).Timeout(time.Minute).Build())
|
||||
|
||||
bot.AddPlugins(economy.Build())
|
||||
bot.AddPlugins(p)
|
||||
}
|
||||
|
||||
func passiveIncome(b *laniakea.Bot) error {
|
||||
@@ -383,12 +390,15 @@ func aboutGroup(ctx *laniakea.MsgContext, db *laniakea.DatabaseContext) {
|
||||
if group.IsVip {
|
||||
out = append(out, "🎏Доступ к ВИП функциям: ✅")
|
||||
}
|
||||
if group.IsPremium {
|
||||
out = append(out, "🎏Доступ к премиум функциям: ✅")
|
||||
}
|
||||
if group.IsTester {
|
||||
out = append(out, "🔓Бета-тестер: ✅")
|
||||
}
|
||||
if group.IsAdmin {
|
||||
out = append(out, "🖥️Доступ к админ функциям: ✅")
|
||||
}
|
||||
if group.IsVip {
|
||||
out = append(out, "🔓Бета-тестер: ✅")
|
||||
}
|
||||
|
||||
ctx.Answer(strings.Join(out, "\n"))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user