Galarzaa90 / NabBot

Discord bot for Tibia servers
https://nabbot.xyz
Apache License 2.0
52 stars 25 forks source link

Some guilds return "There's no guild with that name." #146

Open bashcode opened 5 years ago

bashcode commented 5 years ago

we can't add guild with space, example: new era

/watched addguild New Era

NabBotBOTToday at 1:17 AM There's no guild with that name.

Tschis commented 5 years ago

It is a problem with TibiaData: https://api.tibiadata.com/v2/guild/New%20Era.json { "guild": { "error": "Guild does not exist." }, "information": { "api_version": 2, "execution_time": 0.0004, "last_updated": "2018-11-27 08:24:42", "timestamp": "2018-11-27 08:25:19" } }

xonvanetta commented 5 years ago

Just passing by, but the guild is called "New era". So with capital E its an error. The problem lies in that the character seach is not case sensitive, but guild search is.

Galarzaa90 commented 5 years ago

@xonvanetta NabBot first searches the guild on guildstats.eu, which has case insensitive search, obtains the correct case of the name, and then it searches TibiaData.com with the correct name.