Request error unknow message 10008 but my code isn't related at all to this

i'm send the vanity-url request but i get à 10008 unknow message errur what the heck?
7 Replies
d.js toolkit
d.js toolkit•2mo ago
- What's your exact discord.js npm list discord.js and node node -v version? - Not a discord.js issue? Check out #other-js-ts. - Consider reading #how-to-get-help to improve your question! - Explain what exactly your issue is. - Post the full error stack trace, not just the top part! - Show your code! - Issue solved? Press the button! - ✅ Marked as resolved by staff
Mark
Mark•2mo ago
what's the code and full error including stack
$olo
$olo•2mo ago
send request PATCH vanity-url getting this error: { message: 'Message inconnu', code: 10008 }
rq(`https://discord.com/api/v9/guilds/${guild.id}/vanity-url`, {
"headers": {
"accept": "*/*",
"accept-language": "fr,fr-FR;q=0.9",
"authorization": token,
"content-type": "application/json",
},
"body": `{\"code\":\"${url}\"}`,
"method": "PATCH",
"mode": "cors",
}, (err, response, body) => {
let data = JSON.parse(body);

console.log(data)
})
rq(`https://discord.com/api/v9/guilds/${guild.id}/vanity-url`, {
"headers": {
"accept": "*/*",
"accept-language": "fr,fr-FR;q=0.9",
"authorization": token,
"content-type": "application/json",
},
"body": `{\"code\":\"${url}\"}`,
"method": "PATCH",
"mode": "cors",
}, (err, response, body) => {
let data = JSON.parse(body);

console.log(data)
})
Mark
Mark•2mo ago
this doesn't seem related to d.js if you're making raw api calls. if that's the case, you're better off asking in ddevs in #useful-servers wasn't sure if it was possible with an oauth2 token from a guild admin, so i didn't comment on that part
$olo
$olo•2mo ago
it was with a token user
d.js docs
d.js docs•2mo ago
14. Do not use self-bots or user-bots. Each account must be associated with a human, not a bot. (See our Platform Manipulation Policy Explainer for more.)
- source
$olo
$olo•2mo ago
i was trying to lock my url so make sure no one can remove it but recently discord has changed the thing it now require 2FA okay okay my bad
Want results from more Discord servers?
Add your server