Archived
1

Command to find users on level

This commit is contained in:
2018-01-23 20:13:16 +04:00
parent 190cdc6e7b
commit 6a57d8581c
4 changed files with 69 additions and 22 deletions

View File

@@ -4,8 +4,8 @@
package router
import (
"github.com/go-telegram-bot-api/telegram-bot-api"
"git.wtfteam.pro/fat0troll/i2_bot/lib/dbmapping"
"github.com/go-telegram-bot-api/telegram-bot-api"
"regexp"
)
@@ -159,6 +159,12 @@ func (r *Router) routePrivateRequest(update *tgbotapi.Update, playerRaw *dbmappi
return c.Talkers.AnyMessageUnauthorized(update)
case update.Message.Command() == "find_level":
if c.Users.PlayerBetterThan(playerRaw, "academic") {
return c.Users.FindByLevel(update)
}
return c.Talkers.AnyMessageUnauthorized(update)
case update.Message.Command() == "find_user":
if c.Users.PlayerBetterThan(playerRaw, "academic") {
return c.Users.FindByName(update)