Discord-Levels-Bot icon indicating copy to clipboard operation
Discord-Levels-Bot copied to clipboard

[BUG] Leaderboard doesnt work

Open Shmalle opened this issue 3 years ago • 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.

Shmalle avatar Jul 10 '22 22:07 Shmalle

Hey,

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

222ryan avatar Jul 10 '22 22:07 222ryan

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'

Shmalle avatar Jul 10 '22 22:07 Shmalle

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

222ryan avatar Jul 10 '22 22:07 222ryan

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?

Shmalle avatar Jul 10 '22 22:07 Shmalle

Is there any way to migrate from local to mongoDB?

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

222ryan avatar Jul 10 '22 22:07 222ryan

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.

Shmalle avatar Jul 15 '22 12:07 Shmalle