Closed lk77 closed 4 years ago
hello there,
it is the case https://github.com/warlof/seat-discord-connector/blob/4.0.4/src/Driver/DiscordMember.php#L107 Which versions of seat-connector and seat-discord-connector are you using ?
Hello,
i use warlof/seat-discord-connector 4.0.4 and warlof/seat-connector 1.4.4
for me the issue seems to be in this method: https://github.com/warlof/seat-discord-connector/blob/4.0.4/src/Driver/DiscordClient.php#L231
i've done a dd of $arguments :
array:3 [▼
"nick" => "*** (34 characters)"
"roles" => array:6[...]
"access_token" => "***"
]
Edit :
And also i have another issue with sendCall method, i was force to add a try catch, because there was an error on discord :
if ($method == 'GET') {
$response = $this->client->request($method, $uri, [
'query' => $arguments,
]);
} else {
try {
$response = $this->client->request($method, $uri, [
'body' => json_encode($arguments),
]);
} catch(\Exception $e) {
}
}
#message: """
Client error: `PATCH https://discordapp.com/api/guilds/***/members/***` resulted in a `404 Not Found` response:\n
{"message": "Unknown Member", "code": 10007}\n
"""
sendCall
is only sending requests. If there is an error, it's upper in the stack.
When did you get the error exactly ?
A user tried to link their discord to their seat account but, it was unsucessful, i don't know why.
I finally found it, should be fixed with v4.0.5. It was part of the registration specific flow.
In updateUserProfile need a small change
As is $profile->connector_name = $nickname;
To be $profile->connector_name = $user->getName();
Sounds legit Can you open a pull request please?
Pull request is opened #33
thanks
Hello,
discord has a max nick length of 32 characters, the connector should cut the IG nickname if it's too long for discord.
Thanks.