Archived
1

Pokememe deletion command

This commit is contained in:
2017-12-04 23:14:41 +04:00
parent 8af37b6c34
commit fa71616a14
4 changed files with 63 additions and 3 deletions

View File

@@ -19,11 +19,11 @@ func (f *Forwarder) ProcessForward(update *tgbotapi.Update, playerRaw *dbmapping
switch {
case pokememeMsg.MatchString(text):
c.Log.Debug("Pokememe posted!")
if playerRaw.LeagueID == 1 {
if c.Users.PlayerBetterThan(playerRaw, "admin") {
return c.Pokedexer.ParsePokememe(update, playerRaw)
} else {
return c.Talkers.AnyMessageUnauthorized(update)
}
return c.Talkers.AnyMessageUnauthorized(update)
case profileMsg.MatchString(text):
c.Log.Debug("Profile posted!")
return c.Users.ParseProfile(update, playerRaw)