Skip to content

Bot can not snipe vanity URLs #1

@Permanently

Description

@Permanently

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions