Use this code to change your server banner to a random banner from a list after every X minutes.
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
// Add your list of banners here
let banners = [
'https://cdn.discordapp.com/attachments/956634837668732969/1005073219679690782/MC_1-01.png?width=2310&height=1323', // Minecraft
'https://cdn.discordapp.com/attachments/956634837668732969/1005073220090724412/2042_Disc-02-01-01.png?width=2310&height=1323', // BF2042
'https://cdn.discordapp.com/attachments/956634837668732969/1005073220719890452/FIxed_Banner_New.png?width=2315&height=1323', // BF4
'https://cdn.discordapp.com/attachments/956634837668732969/1005073221080580206/Disc_Ark-01-01.png?width=2310&height=1323', // Ark
];
// Random banner is slected from the list above
let bannerChoice = Math.floor(Math.random() * banners.length);
// Set the randomly selected banner to a variable
let banner = banners[bannerChoice];
// Download the randomly selected "bannerChoice" banner
let buffer = await lib.http.request['@1.1.5']({
method: 'GET',
url: banner,
}).then((result) => {
return result.body;
});
// Update the banner with the result from
// downloading the random server banner
// change guild_id to your guild's ID
let result = await lib.discord.guilds['@0.2.4'].update({
guild_id: `906182641055834152`,
banner: Buffer.from(buffer),
});