Galarzaa90 / NabBot

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

Guildstats.eu format error + Purge error #84

Closed ChrisWhee1er closed 6 years ago

ChrisWhee1er commented 6 years ago

Re-write branch of course.

I'm not sure what the issue is, just see this in the log, popping up a lot today:

2018-03-06 13:17:48,848:ERROR: get_guild_online: -IMPORTANT- guildstats.eu seems to have changed their websites format.

Then on the /purge command it initiates the purge, then hits an error:

2018-03-06 13:25:03,246:INFO: Command by Chris (Sinsae) in PM: /purge 2018-03-06 13:25:05,149:ERROR: Exception in command: purge Traceback (most recent call last): File "C:\Users\Extat\AppData\Local\Programs\Python\Python36-32\discord\ext\com mands\core.py", line 62, in wrapped ret = yield from coro(*args, **kwargs) File "C:\Users\Extat\AppData\Local\Programs\Python\Python36-32\cogs\owner.py", line 289, in purge if char['name'] != row["name"]: TypeError: 'Character' object is not subscriptable

Help and Thanks!

Galarzaa90 commented 6 years ago

About the first issue, what command was called exactly? Can you show me some lines before and after that?

About, purge is a function I haven't mantained in a long time, I'm going to rewrite/delete it soon

ChrisWhee1er commented 6 years ago

There are no commands being given to it. It just shows that message in the CMD window approximately every 3 minutes or so. I'm not sure what triggers it.

2018-03-06 14:14:11,140:ERROR: get_guild_online: -IMPORTANT- guildstats.eu seems to have changed their websites format. 2018-03-06 14:17:11,901:INFO: Announcing level up: Kinzera Life (18) 2018-03-06 14:17:20,752:ERROR: get_guild_online: -IMPORTANT- guildstats.eu seems to have changed their websites format.

ChrisWhee1er commented 6 years ago

I also redownloaded the whole rewrite.zip and replaced the all files, except the data folder. Im receiving the same message.

ChrisWhee1er commented 6 years ago

I have found the issue. It was probably how many people I had it track. on the watchedguild list, I literally added every guild in Amera that it could find. Maybe it was because how many requests the website was getting from me, and blocked me every 3 minutes?

I deleted the #watched-list channel, and stopped receiving the above error.

Galarzaa90 commented 6 years ago

Fixed the error thrown by /purge, I still wouldn't recommend using this command as it hasn't been mantained in a while. If used, create a backup of the database before use.