222ryan/Discord-Levels-Bot

[BUG] Leaderboard doesnt work

Opened this issue · 6 comments

Describe the bug
When running the command to show the leaderboard, nothing happens.

To Reproduce
Run the command to show the leaderboard.

Expected behaviour
I expect the leaderboard to appear.

Screenshots
I mean, nothing happens.

Desktop (please complete the following information):

  • OS: Windows
  • Version: 10 Server

Additional context
Nothing.

Hey,

Just a few question - Are there any errors in console? Does the bot have the correct permissions and is the database setup properly?

Sorry, totally forgot and just went back to check, and yes!

Ignoring exception in on_command_error
Traceback (most recent call last):
  File "C:\Users\Administrator\AppData\Local\Programs\Python\Python37-32\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
    ret = await coro(*args, **kwargs)
  File "C:\Users\Administrator\Documents\Dansoleveling\Commands\leaderboard.py", line 29, in leaderboard
    await KumosLab.Database.Create.Leaderboard.Local.leaderboard.leaderboard(self=self, ctx=ctx, guild=ctx.guild, leader_type=leader_type)
  File "C:\Users\Administrator\Documents\Dansoleveling\KumosLab\Database\Create\Leaderboard\Local\leaderboard.py", line 52, in leaderboard
    guild.append(guild_obj.name)
AttributeError: 'NoneType' object has no attribute 'name'

Was the command sent inside of a server? If so, you can try re-inviting the bot. If that does not work, MongoDB database may be the solution to go for

I will try that asap, command was sent into a server, will message if one of the solution works.

Is there any way to migrate from local to mongoDB?

Is there any way to migrate from local to mongoDB?

Not currently, though I don't think it would be too difficult to add

It indeed isnt difficult, though the MongoDBCompass seems to be unable to find certain entries that are in the SQLite DB (used/using "all members"-option on startup in both DBs)
image
The user didnt leave the server.
EDIT: I figured out that the Compass sucks, searching via username#tagline gave me the "missing" entry. I compared the userID and it was the same as the one that gave me no results for some reason.