diff --git a/commands/info/banner.js b/commands/info/banner.js new file mode 100644 index 0000000..0c93852 --- /dev/null +++ b/commands/info/banner.js @@ -0,0 +1,25 @@ +const parseMention = require('../../util/parseMention'); +module.exports = { + name: 'banner', + description: 'Shows the banners of a user', + async execute({message, args, client}) { + let info; + if (!args[0]) { + info = message.author.id; + } else { + info = parseMention(args[0], message.guild); + } + if(info === ""){ + message.channel.send("Invalid user"); + return; + } + let forceFetchedUser = await client.users.fetch(info, {force: true}); + console.log(forceFetchedUser) + let banner = forceFetchedUser.bannerURL({dynamic: true, size: 4096}); + if(banner == null){ + message.channel.send("User does not have a banner"); + } else { + message.channel.send(banner); + } + } +}; \ No newline at end of file