Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Len of commands.Bot.guilds returning 0 #5955

Closed
4 tasks done
Lost1419 opened this issue Oct 21, 2020 · 4 comments
Closed
4 tasks done

Len of commands.Bot.guilds returning 0 #5955

Lost1419 opened this issue Oct 21, 2020 · 4 comments
Labels
bug This is a bug with the library.

Comments

@Lost1419
Copy link

Lost1419 commented Oct 21, 2020

Summary

When I do get the guilds the bot is in it returns 0 The bot is in 4 server and it seems like even when I try and get them in multiple ways such as using guilds = [guild.id for guild in cient.guilds] it still will return 0 or an empty list

Reproduction Steps

guilds = client.guilds print(len(guilds))

Expected Results

It should print 4 or the list of guild the bot is in.

Actual Results

Returns 0 when using len and an empty list when just using print(guilds)

Intents

intents = discord.Intents.default()
intents.members = True
intents.presences = True

Checklist

  • I have searched the open issues for duplicates.
  • I have shown the entire traceback, if possible.
  • I have removed my token from display, if visible.
  • I have provided the intents that my bot is using.

System Information

  • Python v3.8.6-candidate
  • discord.py v1.5.1-final
  • aiohttp v3.6.2
  • system info: Windows 10 10.0.19041
@Lost1419 Lost1419 added the bug This is a bug with the library. label Oct 21, 2020
@SebbyLaw
Copy link
Contributor

Can't reproduce on v1.5.0, Probably a Duplicate of #5867

Your library version is wrong as well. v15 does not exist.

For further help specific to using this library, you should join either the official discord.py server or the Discord API server, as the README recommends.

@Lost1419
Copy link
Author

Can't reproduce on v1.5.0, Probably a Duplicate of #5867

Your library version is wrong as well. v15 does not exist.

For further help specific to using this library, you should join either the official discord.py server or the Discord API server, as the README recommends.

I have joined the discord there the ones who told me to add the issue. I will join the Discord API server, thanks for looking at it

@Vexs
Copy link
Contributor

Vexs commented Oct 21, 2020

It sounds like this is an intents issue but it could be one of any other- it's unlikely to be an issue with discord.py itself. The discord-api guild has the same people as the discord.py guild, and it would probably be easiest to link the messages where you were told to go here to further sort this.

@Rapptz
Copy link
Owner

Rapptz commented Oct 21, 2020

If this is outside of the on_ready event then the bot has not connected to Discord to give you this data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This is a bug with the library.
Projects
None yet
Development

No branches or pull requests

4 participants