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

Sumbiting paramaters with request #16

Open
saharzelo opened this issue Nov 15, 2021 · 2 comments
Open

Sumbiting paramaters with request #16

saharzelo opened this issue Nov 15, 2021 · 2 comments

Comments

@saharzelo
Copy link

saharzelo commented Nov 15, 2021

Thank you very much for this library!
Adding Query String Params to the request results in a "bad request" error,
guild_memember = await discord.request(f"/guilds/{guild_id}/members", method="GET", data={'limit': 100,})

@jnawk
Copy link
Owner

jnawk commented Feb 10, 2022

A backtrace would be useful.
https://discord.com/developers/docs/resources/guild#list-guild-members states this route requires a privileged intent in the application. Has that been set up? (see https://discord.com/developers/docs/topics/gateway#privileged-intents)

@anselal
Copy link

anselal commented Jan 31, 2023

Thank you very much for this library! Adding Query String Params to the request results in a "bad request" error, guild_memember = await discord.request(f"/guilds/{guild_id}/members", method="GET", data={'limit': 100,})

Screenshot from 2023-01-31 23-24-40

you get an error because limit is a query string parameter which should be used as follows:

        guild_memember = await discord.request(f"/guilds/{guild_id}/members?limit=100", method="GET")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants