Command to find users on level
This commit is contained in:
@@ -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)
|
||||
|
Reference in New Issue
Block a user