UNPKG

discord-banners-js

Version:

Allows you to get a user banner in discord

33 lines (21 loc) 1.13 kB
Hey, i will show you how to use the module : type npm i discord-banners-js in your terminal ```js const Discord = require('discord.js') const banner = require('discord-banners-js') // will get the module const user = message.mentions.members.first() || message.guild.members.cache.get(args[0]) || message.member // will get the user for get the banner const bannerurl = await banner(user.user.id, "your bot token here", { size : 4096 }) // in first you have to give the userid, after your bot token, and the size you want, i recommend you 4096 if(bannerurl) { // if the user have a banner const embed = new Discord.MessageEmbed() // your embed is personal, you can take my embed .setTitle(`Here is the banner of ${user.user.username}!`) .setImage(`${bannerurl}`) .setColor(`RANDOM`) message.channel.send({embeds : [embed]}) // now send the embed with the banners } else { // if user doesn't have a banner return message.channel.send(`${user.user.username} doesn't have a banner :/`) } so, come on discord ( 999.Frost#0999 ) if you need help or something, enjoy ! ```