-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Subroutine setVanityURL() was edited to the following:
async setVanityURL(url, guild) {
const time = moment.tz(Date.now(), "Europe/London").format("HH:mm:ss");
console.log(`[${time}] [INFO] Sniping discord.gg/${url}`);
var response = await fetch(`https://discord.com/api/v8/guilds/${guild.id}/vanity-url`, {
"credentials": "include",
"headers": {
"accept": "*/*",
"authorization": "Bot " + client.token,
"content-type": "application/json",
},
"referrerPolicy": "no-referrer-when-downgrade",
"body": JSON.stringify({
"code": url
}),
"method": "PATCH",
"mode": "cors"
});
console.log(await response.text());
return response;
}
The bot returns this response:
[INFO] Sniping discord.gg/test123
{"message": "Bots cannot use this endpoint", "code": 20001}
Metadata
Metadata
Assignees
Labels
No labels