Skip to content
This repository has been archived by the owner on Nov 12, 2022. It is now read-only.

[BUG] Leaderboard doesnt work #16

Open
Shmalle opened this issue Jul 10, 2022 · 6 comments
Open

[BUG] Leaderboard doesnt work #16

Shmalle opened this issue Jul 10, 2022 · 6 comments
Labels
bug Something isn't working

Comments

@Shmalle
Copy link

Shmalle commented Jul 10, 2022

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 Shmalle added the bug Something isn't working label Jul 10, 2022
@222ryan
Copy link
Owner

222ryan commented Jul 10, 2022

Hey,

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

@Shmalle
Copy link
Author

Shmalle commented Jul 10, 2022

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'

@222ryan
Copy link
Owner

222ryan commented Jul 10, 2022

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

@Shmalle
Copy link
Author

Shmalle commented Jul 10, 2022

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?

@222ryan
Copy link
Owner

222ryan commented Jul 10, 2022

Is there any way to migrate from local to mongoDB?

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

@Shmalle
Copy link
Author

Shmalle commented Jul 15, 2022

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants