Skip to content

ravenastar-js/discord-botbanner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 

Repository files navigation

CHANGE BOT BANNER

javascript, node.js & discord.js

        const { REST } = require("@discordjs/rest");
        const { Routes } = require("discord-api-types/v9");
        const { DataResolver } = require("discord.js");

        const rest = new REST({ version: "9" }).setToken("BOT_TOKEN_HERE");

        try {
            await rest.patch(Routes.user(), {
                body: { banner: await DataResolver.resolveImage("FILE PATH OR BANNER LINK") },
            });
            console.log("Banner updated successfully!!!")
        } catch (err) {
            console.log("Failed to update banner:\n"+ err)
        }

For more information join the server Discord Developers (DDevs)

image