From b0fcff67b5b80d78c4d692556fdbfa452f5c5157 Mon Sep 17 00:00:00 2001 From: Abheek Dhawan Date: Wed, 28 Apr 2021 08:59:13 -0500 Subject: [PATCH] Use larger image sizes --- bot.js | 61 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 31 insertions(+), 30 deletions(-) diff --git a/bot.js b/bot.js index d10c2da..fc7fe7c 100644 --- a/bot.js +++ b/bot.js @@ -208,7 +208,7 @@ async function reactionRole(message) { const verificationEmbed = new Discord.MessageEmbed() .setTitle(`Are you sure you would like ${reaction.emoji.name} to correspond to the **${role.name}** role?`) .setDescription("React to this message to verify") - .setThumbnail(message.guild.iconURL({ dynamic: true })) + .setThumbnail(message.guild.iconURL({ dynamic: true, size: 1024 })) .setColor("fda172") .setTimestamp(); message.author.dmChannel.send(verificationEmbed) @@ -266,7 +266,7 @@ async function aboutBot(message) { const aboutBotEmbed = new Discord.MessageEmbed() .setTitle("About AwesomeMod!") .setURL(`https://github.com/ADawesomeguy/AwesomeMod`) - .setAuthor(client.user.tag, client.user.avatarURL({ dynamic: true })) + .setAuthor(client.user.tag, client.user.avatarURL({ dynamic: true, size: 1024 })) .addField(`Servers`, `${serverCount}`, true) .addField(`Uptime`, `${uptimeDays.toFixed(1)} days`, true) .addField(`Invite Link`, `[Click here!](https://adat.link/awesomemod)`) @@ -310,7 +310,7 @@ async function locateISS(message) { async function ping(message) { const pingEmbed = new Discord.MessageEmbed() - .setAuthor(message.author.tag, message.author.avatarURL({ dynamic: true })) + .setAuthor(message.author.tag, message.author.avatarURL({ dynamic: true, size: 1024 })) .setTitle("Pong!") .addField(`🏓`, `${Date.now() - message.createdTimestamp}ms`) .addField(`API`, `${Math.round(client.ws.ping)}ms`) @@ -493,12 +493,13 @@ async function userInfo(message) { const member = members.array()[0]; const userInfoEmbed = new Discord.MessageEmbed() - .setAuthor(member.user.tag, member.user.avatarURL({ dynamic: true })) + .setAuthor(member.user.tag, member.user.avatarURL({ dynamic: true, size: 1024 })) .addField("Roles", member.roles.cache.map(r => `${r}`).join(' • ')) .addField("Permissions", member.permissions.toArray().map(p => `\`${p}\``.toLowerCase()).join(' • ')) .addField("Joined at", `${new Date(member.joinedTimestamp).toLocaleString("en-US", {timeZoneName: "short"})}`, true) .addField("Account created", `${new Date(member.user.createdTimestamp).toLocaleString("en-US", {timeZoneName: "short"})}`, true) .setColor("00c5ff") + .setThumbnail(member.user.avatarURL({ dynamic: true, size: 1024 })) .setFooter(`User ID: ${member.user.id}`) .setTimestamp(); message.channel.send(userInfoEmbed).catch(console.error); @@ -528,11 +529,11 @@ async function roleInfo(message) { const roleInfoEmbed = new Discord.MessageEmbed() .setTitle(`Role \`${role.name}\` Info`) - .setAuthor(message.author.tag, message.author.avatarURL({ dynamic: true })) + .setAuthor(message.author.tag, message.author.avatarURL({ dynamic: true, size: 1024 })) .addField("Permissions", role.permissions.toArray().map(p => `\`${p}\``.toLowerCase()).join(' • ')) .addField("Mentionable", role.mentionable) .setFooter("Role ID: " + role.id) - .setThumbnail(message.author.avatarURL({ dynamic: true })) + .setThumbnail(message.author.avatarURL({ dynamic: true, size: 1024 })) .setTimestamp() .setColor('00aaff'); message.channel.send(roleInfoEmbed) @@ -598,7 +599,7 @@ async function addRole(message) { const verificationEmbed = new Discord.MessageEmbed() .setTitle(`Are you sure you want to give \`${member.user.tag}\` the **${role.name}** role?`) .setDescription("React to this message to verify") - .setThumbnail(member.user.avatarURL({ dynamic: true })) + .setThumbnail(member.user.avatarURL({ dynamic: true, size: 1024 })) .setColor("fda172") .setTimestamp(); message.channel.send(verificationEmbed) @@ -662,7 +663,7 @@ async function ban(message) { let verificationEmbed = new Discord.MessageEmbed() .setTitle(`Are you sure you would like to ban \`${member.user.tag}\`?`) - .setAuthor(member.user.tag, member.user.avatarURL({ dynamic: true })) + .setAuthor(member.user.tag, member.user.avatarURL({ dynamic: true, size: 1024 })) .setDescription("React to this message to verify") .setThumbnail("https://emoji.gg/assets/emoji/9156_BanThonking.png") .setColor("fda172") @@ -726,7 +727,7 @@ async function kick(message) { const verificationEmbed = new Discord.MessageEmbed() .setTitle(`Are you sure you would like to kick \`${member.user.tag}\`?`) .setDescription("React to this message to verify") - .setThumbnail(member.user.avatarURL({ dynamic: true })) + .setThumbnail(member.user.avatarURL({ dynamic: true, size: 1024 })) .setColor("fda172") .setTimestamp(); message.channel.send(verificationEmbed) @@ -758,7 +759,7 @@ async function helpMessage(message, prefix) { .addField(`Admin commands:`, `Add logs channel: \`${prefix}startLogs\`\nAdd külboard channel: \`${prefix}kulboard\`\nAdd member count channel: \`${prefix}memberCountChannel\`\nBulk delete: \`${prefix}bulkDelete\`\nBan: \`${prefix}ban [user]\`\nKick: \`${prefix}kick [user]\`\nGive user role: \`${prefix}addRole [role] [user]\`\nSet custom prefix: \`${prefix}prefix [new prefix]\``) .addField(`User commands:`, `Role request: \`${prefix}roleRequest [role]\`\nView users with role: \`${prefix}usersWith [role]\`\nUser info: \`${prefix}userInfo [user]\``) .addField(`Fun commands:`, `Show ISS location: \`${prefix}iss\`\nMeasure latency: \`${prefix}ping\`\nAdd custom emoji: \`${prefix}addEmoji [url] [name]\``) - .setThumbnail(client.user.avatarURL({ dynamic: true })) + .setThumbnail(client.user.avatarURL({ dynamic: true, size: 1024 })) .setFooter(`Bot ID: ${client.user.id}`) .setColor("00c5ff") .setTimestamp(); @@ -875,7 +876,7 @@ async function aboutServer(message) { .addField("Roles", numRoles) .addField("Created", `${new Date(message.guild.createdTimestamp).toLocaleString("en-US", {timeZoneName: "short"})}`) .addField("User Statuses", `🟦 • ${numOnline} online\n\n🟧 • ${numAway} away\n\n⬛ • ${numOffline} offline\n\n🟥 • ${numDND} DND`) - .setThumbnail(message.guild.iconURL({ dynamic: true })) + .setThumbnail(message.guild.iconURL({ dynamic: true, size: 1024 })) .setFooter(`Server ID: ${message.guild.id}`) .setColor("00c5ff") .setTimestamp(); @@ -914,7 +915,7 @@ async function roleRequest(message) { const verificationEmbed = new Discord.MessageEmbed() .setTitle(`\`${message.author.tag}\` would like the **${role.name}** role. Are they worthy?`) .setDescription("React to this message to verify") - .setThumbnail(message.author.avatarURL({ dynamic: true })) + .setThumbnail(message.author.avatarURL({ dynamic: true, size: 1024 })) .setColor("fda172") .setTimestamp(); message.channel.send(verificationEmbed) @@ -966,11 +967,11 @@ async function bulkDelete(message) { client.on('messageDelete', message => { const deleteEmbed = new Discord.MessageEmbed() .setTitle('Message Deleted') - .setAuthor(message.author ? message.author.tag : "Unknown", message.author ? message.author.avatarURL({ dynamic: true }) : client.user.defaultAvatarURL) + .setAuthor(message.author ? message.author.tag : "Unknown", message.author ? message.author.avatarURL({ dynamic: true, size: 1024 }) : client.user.defaultAvatarURL) .addField('Author', message.author ? message.author.tag : "Message not cached") .addField('Message', message.content ? message.content : "Message not cached") .addField('Channel', message.channel ? message.channel : "Message not cached") - .setThumbnail(message.author ? message.author.avatarURL({ dynamic: true }) : client.user.defaultAvatarURL) + .setThumbnail(message.author ? message.author.avatarURL({ dynamic: true, size: 1024 }) : client.user.defaultAvatarURL) .setFooter("ID: " + message.id) .setTimestamp() .setColor('e7778b'); @@ -1020,9 +1021,9 @@ client.on('messageUpdate', (originalMessage, editedMessage) => { const editEmbed = new Discord.MessageEmbed() .setTitle("Message Edited") .addField("Link", `[Click here!](${editedMessage.url})`) - .setAuthor(editedMessage.author ? editedMessage.author.tag : "Unknown", editedMessage.author ? editedMessage.author.avatarURL({ dynamic: true }) : client.user.defaultAvatarURL) + .setAuthor(editedMessage.author ? editedMessage.author.tag : "Unknown", editedMessage.author ? editedMessage.author.avatarURL({ dynamic: true, size: 1024 }) : client.user.defaultAvatarURL) .addField("Author", editedMessage.author.tag) - .setThumbnail(editedMessage.author.avatarURL({ dynamic: true })) + .setThumbnail(editedMessage.author.avatarURL({ dynamic: true, size: 1024 })) .setFooter("ID: " + editedMessage.id) .setTimestamp() .setColor('c9ff00'); @@ -1097,11 +1098,11 @@ client.on('messageReactionAdd', (messageReaction, user) => { } const messageReactionAddEmbed = new Discord.MessageEmbed() .setTitle("Reaction Added") - .setAuthor(user.tag, user.avatarURL({ dynamic: true })) + .setAuthor(user.tag, user.avatarURL({ dynamic: true, size: 1024 })) .addField("Link", `[Click here!](${message.url})`) .addField("Reactions", `${user} reacted with ${messageReaction.emoji} to ${messageReaction.message.author}'s message, along with ${numEmoji - 1} other people in ${messageReaction.message.channel}.`) .setFooter("Message ID: " + messageReaction.message.id) - .setThumbnail(user.avatarURL({ dynamic: true })) + .setThumbnail(user.avatarURL({ dynamic: true, size: 1024 })) .setTimestamp() .setColor('00aaff'); @@ -1120,10 +1121,10 @@ client.on('messageReactionAdd', (messageReaction, user) => { const kulboardEmbed = new Discord.MessageEmbed() .setTitle(`${coolness}`) .addField("Link", `[Click here!](${message.url})`, true) - .setAuthor(message.author.tag, message.author.avatarURL({ dynamic: true })) + .setAuthor(message.author.tag, message.author.avatarURL({ dynamic: true, size: 1024 })) .addField(`# of 😎 Reactions`, `${numEmoji}`, true) .addField("Channel", message.channel, true) - .setThumbnail(message.author.avatarURL({ dynamic: true })) + .setThumbnail(message.author.avatarURL({ dynamic: true, size: 1024 })) .setFooter("Message ID: " + message.id) .setColor("00c5ff") .setTimestamp(); @@ -1218,11 +1219,11 @@ client.on('messageReactionRemove', async (messageReaction, user) => { } const messageReactionRemoveEmbed = new Discord.MessageEmbed() .setTitle("Reaction Removed") - .setAuthor(user.tag, user.avatarURL({ dynamic: true })) + .setAuthor(user.tag, user.avatarURL({ dynamic: true, size: 1024 })) .addField("Link", `[Click here!](${message.url})`) .addField("Reactions", `${user} removed their reaction ${messageReaction.emoji} on ${messageReaction.message.author}'s message in ${messageReaction.message.channel}.`) .setFooter("Message ID: " + messageReaction.message.id) - .setThumbnail(user.avatarURL({ dynamic: true })) + .setThumbnail(user.avatarURL({ dynamic: true, size: 1024 })) .setTimestamp() .setColor('e7778b'); @@ -1241,10 +1242,10 @@ client.on('messageReactionRemove', async (messageReaction, user) => { const kulboardEmbed = new Discord.MessageEmbed() .setTitle(`${coolness}`) .addField("Link", `[Click here!](${message.url})`, true) - .setAuthor(message.author.tag, message.author.avatarURL({ dynamic: true })) + .setAuthor(message.author.tag, message.author.avatarURL({ dynamic: true, size: 1024 })) .addField(`# of 😎 Reactions`, `${numEmoji}`, true) .addField("Channel", message.channel, true) - .setThumbnail(message.author.avatarURL({ dynamic: true })) + .setThumbnail(message.author.avatarURL({ dynamic: true, size: 1024 })) .setFooter("Message ID: " + message.id) .setColor("00c5ff") .setTimestamp(); @@ -1403,12 +1404,12 @@ client.on('guildMemberAdd', member => { memberCountChannelUpdate(member); const memberAddEmbed = new Discord.MessageEmbed() .setTitle("New Member") - .setAuthor(member.user.tag, member.user.avatarURL({ dynamic: true })) + .setAuthor(member.user.tag, member.user.avatarURL({ dynamic: true, size: 1024 })) .addField("Tag", `${member.user.tag}`) .addField("Joined At", `${new Date(member.joinedTimestamp).toLocaleString("en-US", {timeZoneName: "short"})}`) .addField("Account Created", `${new Date(member.user.createdTimestamp).toLocaleString("en-US", {timeZoneName: "short"})}`) .setFooter("Member ID: " + member.id) - .setThumbnail(member.user.avatarURL({ dynamic: true })) + .setThumbnail(member.user.avatarURL({ dynamic: true, size: 1024 })) .setTimestamp() .setColor('c9ff00'); collection.findOne({ guild_id: member.guild.id }, (error, result) => { @@ -1428,12 +1429,12 @@ client.on('guildMemberRemove', member => { memberCountChannelUpdate(member); const memberRemoveEmbed = new Discord.MessageEmbed() .setTitle("Member Removed") - .setAuthor(member.user.tag, member.user.avatarURL({ dynamic: true })) + .setAuthor(member.user.tag, member.user.avatarURL({ dynamic: true, size: 1024 })) .addField("Tag", `${member.user.tag}`) .addField("Joined At", `${new Date(member.joinedTimestamp).toLocaleString("en-US", {timeZoneName: "short"})}`) .addField("Account Created", `${new Date(member.user.createdTimestamp).toLocaleString("en-US", {timeZoneName: "short"})}`) .setFooter("Member ID: " + member.id) - .setThumbnail(member.user.avatarURL({ dynamic: true })) + .setThumbnail(member.user.avatarURL({ dynamic: true, size: 1024 })) .setTimestamp() .setColor('e7778b'); collection.findOne({ guild_id: member.guild.id }, (error, result) => { @@ -1454,9 +1455,9 @@ client.on('guildMemberUpdate', (oldMember, newMember) => { const addedRoles = newMember.roles.cache.filter(role => !oldMember.roles.cache.has(role.id)); const memberUpdateEmbed = new Discord.MessageEmbed() .setTitle("Member Updated") - .setAuthor(newMember.user.tag, newMember.user.avatarURL({ dynamic: true })) + .setAuthor(newMember.user.tag, newMember.user.avatarURL({ dynamic: true, size: 1024 })) .setFooter("Member ID: " + newMember.id) - .setThumbnail(newMember.user.avatarURL({ dynamic: true })) + .setThumbnail(newMember.user.avatarURL({ dynamic: true, size: 1024 })) .setTimestamp() .setColor('c9ff00'); if (removedRoles.array().length > 0) {