Skip to content

Instantly share code, notes, and snippets.

@MinerPL
Created March 15, 2024 20:41
Show Gist options
  • Save MinerPL/feb9cde181ffff6afe1fe331e2f1daa8 to your computer and use it in GitHub Desktop.
Save MinerPL/feb9cde181ffff6afe1fe331e2f1daa8 to your computer and use it in GitHub Desktop.
Simple snippet that set bot banner to gif
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