Returned duplicate pokememe error
This commit is contained in:
parent
b8226d8aa8
commit
4a90e0ffd7
@ -134,6 +134,13 @@ func (p *Pokedexer) ParsePokememe(update *tgbotapi.Update, playerRaw *dbmapping.
|
||||
return "fail"
|
||||
}
|
||||
|
||||
_, err = c.DataCache.GetPokememeByName(pokememeData["name"])
|
||||
if err == nil {
|
||||
// There is already a pokememe with such name
|
||||
p.pokememeAddDuplicateMessage(update)
|
||||
return "fail"
|
||||
}
|
||||
|
||||
newPokememeID, err := c.DataCache.AddPokememe(pokememeData, pokememeLocations, pokememeElements)
|
||||
if err != nil {
|
||||
c.Log.Error(err.Error())
|
||||
|
Reference in New Issue
Block a user