pycord icon indicating copy to clipboard operation
pycord copied to clipboard

Fetch_guild getting with_counts

Open JDJGInc opened this issue 5 years ago • 8 comments

Summary

This basically adds the ability to correctly get prescence_count

What is the feature request for?

The core library

The Problem

The problem is that you can't do this on the guild object itself(and to add stuff that doesn't exist in guild stuff)

The Ideal Solution

I would like this fork to be able to get prescence_count, the new member_count at the time, and of course other guild information

having a fetch_guild with the prescence_count and member_count as a part of the guild object, otherwise normal get would have prescence_count None, and member_count would be the most updated(it also doesn't require intents to get all the users online, you can't always get intents either. Discord would probaly like it even more if you added this) and being able to get with_counts on many guilds with fetch_guilds.

The Current Solution

The current one is to fetch the invite(which as we know we don't always have permissions to make, and not all guilds have vanity urls), but even so you should only have to be able to use fetch_guild or fetch_guilds.

for example now you need to have an invite object to get the prescence count, and an accurate member_count.

Additional Context

No response

JDJGInc avatar Sep 10 '21 23:09 JDJGInc

Could you elaborate on this?

Grace-codes avatar Sep 12 '21 02:09 Grace-codes

Discord.py was missing the option to grab prescence data(a.k.a those who are not offline), except by invites, the with_counts has it fetch via fetch__guild which is much better than getting it on invite.

JDJGInc avatar Sep 12 '21 17:09 JDJGInc

https://github.com/Rapptz/discord.py/pull/4029/files Look at this old pull request.

JDJGInc avatar Nov 16 '21 02:11 JDJGInc

image It's also probably better than having to make a manually invite in order to get these. Source: https://discord.com/developers/docs/resources/guild Can you also add other missing values rom https://discord.com/developers/docs/resources/guild? if so thanks :D. I'll uh find out what values aren't covered yet. (I am not talking about threads or stuff that's already covered as the update suggests)

JDJGInc avatar Nov 16 '21 02:11 JDJGInc

This a copy and paste( a bit from my old thing)

JDJGInc avatar Nov 16 '21 02:11 JDJGInc

So yes, it will work better with this, and discord will likely appreciate this, rather than getting intents to just get the data of online users and offline, and this also supports more of the api :D.

JDJGInc avatar Nov 16 '21 05:11 JDJGInc

image you could be supporting something other libraries have https://gist.github.com/advaith1/e69bcc1cdd6d0087322734451f15aa2f

JDJGInc avatar Nov 16 '21 05:11 JDJGInc

https://github.com/Pycord-Development/pycord/pull/465 this should fix it I believe(if you could make my pull request close this issue that would be great)

JDJGInc avatar Nov 16 '21 07:11 JDJGInc