We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
In the Guild interface, getGuildMember() has the following signature and docblock:
getGuildMember()
/** * @see https://discordapp.com/developers/docs/resources/guild#get-guild-member * * @param array $options ['guild.id' => 'snowflake', 'user.id' => 'snowflake'] * @return array */ public function getGuildMember(array $options);
in dev-develop branch, this function returned a GuildMember object, but with v9.x it's now returning a GuzzleHttp\Command\Result object.
dev-develop
GuildMember
GuzzleHttp\Command\Result
POC:
$token = "You think I'd post that?"; $guild = 364721362914508801; $id = 107056552212447232; $discord = new DiscordClient(['token' => $token]); $parameters = [ 'guild.id' => $guild, 'user.id' => $id, ]; dd($discord->guild->getGuildMember($parameters));
RestCord\Model\Guild\GuildMember {#1518 ▼ +deaf: false +joined_at: DateTimeImmutable @1613860916 {#1505 ▶} +premium_since: null +mute: false +nick: "Thor" +roles: array:14 [▶] +user: RestCord\Model\User\User {#1508 ▶} }
v9.x-dev
GuzzleHttp\Command\Result {#1348 ▼ #data: array:11 [▶] roles: array:14 [▶] nick: "Thor" avatar: "f74d1b54c40d12445ed518647a5e1100" premium_since: null joined_at: "2021-02-20T22:41:56.501000+00:00" is_pending: false pending: false communication_disabled_until: null user: array:5 [▶] mute: false deaf: false }
The text was updated successfully, but these errors were encountered:
Can confirm. Ran into the same issue while testing other 9.x things, and my logic that retrieves guild member details broke due to this change.
Sorry, something went wrong.
I've found out the same problem.
To fix it, you can update the service description json located here : src/Resources/service_description-v9.json
replace the "getGuildMember" array L.403 by this one :
"getGuildMember": { "link": "https://discordapp.com/developers/docs/resources/guild#get-guild-member", "resource": "guild", "name": "Get Guild Member", "method": "GET", "url": "/guilds/{guild.id}/members/{user.id}", "description": "guild member", "responseNote": "Returns a guild member object for the specified user.", "responseTypes": [ { "name": "guild member", "type": "guild/guild-member" } ], "parameters": { "guild.id": { "type": "snowflake", "location": "uri", "required": true }, "user.id": { "type": "snowflake", "location": "uri", "required": true } }, "parametersArray": false }
This one is copied from the v6 json and work perfectly.
No branches or pull requests
In the Guild interface,
getGuildMember()
has the following signature and docblock:in
dev-develop
branch, this function returned aGuildMember
object, but with v9.x it's now returning aGuzzleHttp\Command\Result
object.POC:
dev-develop
v9.x-dev
The text was updated successfully, but these errors were encountered: