Created
March 15, 2024 20:41
-
-
Save MinerPL/feb9cde181ffff6afe1fe331e2f1daa8 to your computer and use it in GitHub Desktop.
Simple snippet that set bot banner to gif
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { REST } = require('@discordjs/rest'); | |
const { readFileSync } = require('fs'); | |
const client = new REST({ version: '9' }).setToken('BOTTOKEN'); | |
const banner = readFileSync('./file.gif'); | |
client.patch('/users/@me', { | |
body: { | |
banner: `data:image/gif;base64,${banner.toString('base64')}`, | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment