Closed hhaste closed 8 months ago
I think it would be better to add a new method UserGuildsWithCounts
to not break current code. The old method can then just dispatch to the new one. Sad that go doesn't have default args...
You could also update struct member docs for ApproximateMemberCount
and ApproximatePresenceCount
since that doesn't currently mention this new way to obtain the information. Should probably switch that over to the methods you can call in discordgo for this instead of the verbatim copy from the discord api docs.
I think it would be better to add a new method
UserGuildsWithCounts
to not break current code. The old method can then just dispatch to the new one.
@Earlopain There would be no withCounts
argument on the UserGuildsWithCounts
function, so having the old method dispatch to the new one wouldn't work. I could still make a new method for it, but it would just be a duplicate of the old code except passing the with_counts
query which felt redundant.
Oh, right. Tbh, I don't know how this is usually handled, I haven't been around here for very long. @FedorLap2006 should be able to give some input there.
I think there is no point in introducing a separate function for withCounts
parameter.
While yes, this would be a breaking change, this would be better than having two almost identical functions, with the only difference being that parameter.
This PR adds support for the
with_count
query parameter on theUserGuilds()
function.Additionally, the
limit
of returned guilds has been increased from 100 to 200.Reference: https://discord.com/developers/docs/resources/user#get-current-user-guilds