From a57dfd6808479dce9dbe524aa6921016d2d14c94 Mon Sep 17 00:00:00 2001 From: mudkipscience Date: Mon, 16 Mar 2020 12:21:19 +1100 Subject: [PATCH 1/5] Avatars are now larger --- src/commands/about.js | 2 +- src/commands/avatar.js | 2 +- src/commands/ban.js | 2 +- src/commands/giverole.js | 2 +- src/commands/hackban.js | 2 +- src/commands/kick.js | 2 +- src/commands/mute.js | 2 +- src/commands/nowplaying.js | 2 +- src/commands/purge.js | 2 +- src/commands/raidmode.js | 2 +- src/commands/servericon.js | 2 +- src/commands/serverinfo.js | 2 +- src/commands/softban.js | 2 +- src/commands/takerole.js | 2 +- src/commands/unmute.js | 2 +- src/commands/userinfo.js | 4 ++-- 16 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/commands/about.js b/src/commands/about.js index 02b2c2c..5c1538f 100644 --- a/src/commands/about.js +++ b/src/commands/about.js @@ -28,7 +28,7 @@ exports.run = (client, message) => { embed = new Discord.MessageEmbed(); embed.setTitle(`Woomy`); embed.setColor(client.embedColour(message)); - embed.setThumbnail(client.user.avatarURL({format: "png", dynamic: true})) + embed.setThumbnail(client.user.avatarURL({format: "png", dynamic: true, size: 2048})) embed.addField( "General:", `• users: \`${client.users.cache.size}\`\n• channels: \`${client.channels.cache.size}\`\n• servers: \`${client.guilds.cache.size}\`\n• commands: \`${client.commands.size}\`\n• uptime: \`${duration}\``,true ); diff --git a/src/commands/avatar.js b/src/commands/avatar.js index 1bbb9e4..5832be2 100644 --- a/src/commands/avatar.js +++ b/src/commands/avatar.js @@ -19,7 +19,7 @@ exports.run = (client, message, args) => { user = users[0]; user = user.user; } - message.channel.send(`**${user.tag}'s** avatar is: ${user.avatarURL({format: "png", dynamic: true})}`); + message.channel.send(`**${user.tag}'s** avatar is: ${user.avatarURL({format: "png", dynamic: true, size: 2048})}`); }; exports.conf = { diff --git a/src/commands/ban.js b/src/commands/ban.js index fe403c2..affa882 100644 --- a/src/commands/ban.js +++ b/src/commands/ban.js @@ -58,7 +58,7 @@ exports.run = async (client, message, args) => { if (channel) { let embed = new Discord.MessageEmbed(); embed.setColor("#BC0057"); - embed.setAuthor("User banned!", user.user.avatarURL({format: "png", dynamic: true})); + embed.setAuthor("User banned!", user.user.avatarURL({format: "png", dynamic: true, size: 2048})); embed.setDescription( `• User: ${user.user.tag} (${user.user.id})\n• Mod: ${message.author} (${message.author.id})\n• Reason: ${reason}` ); diff --git a/src/commands/giverole.js b/src/commands/giverole.js index 356cd74..f62a055 100644 --- a/src/commands/giverole.js +++ b/src/commands/giverole.js @@ -59,7 +59,7 @@ exports.run = async (client, message, [member, ...role2add], query) => { if (channel) { let embed = new Discord.MessageEmbed(); embed.setColor("#00c09a"); - embed.setAuthor("Role given:", user.user.avatarURL({format: "png", dynamic: true})); + embed.setAuthor("Role given:", user.user.avatarURL({format: "png", dynamic: true, size: 2048})); embed.setDescription(`‏‏‎• User: ${user} (${user.user.id})\n‏‏‎• Mod: ${message.author} (${message.author.id})\n‏‏‎• Role: ${gRole}`) try { channel.send({ embed }); diff --git a/src/commands/hackban.js b/src/commands/hackban.js index c18b880..ff4d1cb 100644 --- a/src/commands/hackban.js +++ b/src/commands/hackban.js @@ -31,7 +31,7 @@ exports.run = async (client, message, args) => { if (channel) { let embed = new Discord.MessageEmbed(); embed.setColor("#BC0057"); - embed.setAuthor("User banned!", user.avatarURL({format: "png", dynamic: true})); + embed.setAuthor("User banned!", user.avatarURL({format: "png", dynamic: true, size: 2048})); embed.setDescription( `• User: ${user.tag} (${user.id})\n• Mod: ${message.author} (${message.author.id})\n• Reason: ${reason}` ); diff --git a/src/commands/kick.js b/src/commands/kick.js index 0002f44..9070a98 100644 --- a/src/commands/kick.js +++ b/src/commands/kick.js @@ -58,7 +58,7 @@ if (settings.modlogsChannel !== "off") { if (channel) { let embed = new Discord.MessageEmbed(); embed.setColor("#fd0061"); - embed.setAuthor("User kicked!", user.user.avatarURL({format: "png", dynamic: true})); + embed.setAuthor("User kicked!", user.user.avatarURL({format: "png", dynamic: true, size: 2048})); embed.setDescription( `• User: ${user.user.tag} (${user.user.id})\n• Mod: ${message.author} (${message.author.id})\n• Reason: ${reason}` ); diff --git a/src/commands/mute.js b/src/commands/mute.js index a59f72d..a52e7c5 100644 --- a/src/commands/mute.js +++ b/src/commands/mute.js @@ -85,7 +85,7 @@ exports.run = async (client, message, [args, ...reason], level) => { if (channel) { let embed = new Discord.MessageEmbed(); embed.setColor("#a652bb"); - embed.setAuthor("User muted!", user.user.avatarURL({format: "png", dynamic: true})); + embed.setAuthor("User muted!", user.user.avatarURL({format: "png", dynamic: true, size: 2048})); embed.setDescription( `• User: ${user} (${user.user.id})\n• Mod: ${message.author} (${message.author.id})\n• Reason: ${muteReason}` ); diff --git a/src/commands/nowplaying.js b/src/commands/nowplaying.js index 9aa0487..e94f71a 100644 --- a/src/commands/nowplaying.js +++ b/src/commands/nowplaying.js @@ -23,7 +23,7 @@ exports.run = async (client, message) => { embed.setDescription(`**[${song.title}](https://www.youtube.com/watch?v=${song.id})**`) embed.addField("Channel:", song.author, true) embed.addField("Time:", timestamp, true) - embed.setFooter("Requested by " + song.requestedBy.tag, song.requestedBy.avatarURL({format: "png", dynamic: true})) + embed.setFooter("Requested by " + song.requestedBy.tag, song.requestedBy.avatarURL({format: "png", dynamic: true, size: 2048})) message.channel.send(embed) }; diff --git a/src/commands/purge.js b/src/commands/purge.js index 406bf64..79cf320 100644 --- a/src/commands/purge.js +++ b/src/commands/purge.js @@ -34,7 +34,7 @@ exports.run = async (client, message, args, level) => { if (channel) { let embed = new Discord.MessageEmbed(); embed.setColor("#a62019"); - embed.setAuthor(`${amount} messages purged!`, message.author.avatarURL({format: "png", dynamic: true})); + embed.setAuthor(`${amount} messages purged!`, message.author.avatarURL({format: "png", dynamic: true, size: 2048})); embed.setDescription(`• Channel: ${message.channel.name} (${message.channel.id})\n• Mod: ${message.author} (${message.author.id})\n• Amount: \`${amount}\``) try { channel.send({ embed }); diff --git a/src/commands/raidmode.js b/src/commands/raidmode.js index 976d2ae..68a70ec 100644 --- a/src/commands/raidmode.js +++ b/src/commands/raidmode.js @@ -43,7 +43,7 @@ exports.run = async (client, message, args, level) => { if (channel) { let embed = new Discord.MessageEmbed(); embed.setColor(embColour); - embed.setAuthor(raidToggle, message.author.avatarURL({dynamic: true})); + embed.setAuthor(raidToggle, message.author.avatarURL({format: "png", dynamic: true, size: 2048})); embed.setDescription(`• Mod: ${message.author} (${message.author.id})`) try { channel.send({ embed }); diff --git a/src/commands/servericon.js b/src/commands/servericon.js index 5a22748..2eb44c4 100644 --- a/src/commands/servericon.js +++ b/src/commands/servericon.js @@ -1,5 +1,5 @@ exports.run = (client, message) => { - message.channel.send(`**${message.guild}'s** icon is:\n${message.guild.iconURL({format: "png", dynamic: true})}`) + message.channel.send(`**${message.guild}'s** icon is:\n${message.guild.iconURL({format: "png", dynamic: true, size: 2048})}`) }; exports.conf = { diff --git a/src/commands/serverinfo.js b/src/commands/serverinfo.js index 41c8b0c..89c2230 100644 --- a/src/commands/serverinfo.js +++ b/src/commands/serverinfo.js @@ -78,7 +78,7 @@ exports.run = (client, message) => { .setColor(message.guild.member(client.user).displayHexColor) .setTitle(guild.name) .setDescription(`${badges}• **ID:** ${guild.id}\n• **Owner:** ${guild.owner}\n• **Region:** ${guild.region.toProperCase()}\n• **Boosts:** ${boosts}\n• **Members:** ${members}\n• **Channels:** ${channelString}\n• **Roles:** ${roles}\n• **Emojis:** ${emojiString}\n• **Creation date:** ${guild.createdAt}`) - .setThumbnail(message.guild.iconURL({format: "png", dynamic: true})); + .setThumbnail(message.guild.iconURL({format: "png", dynamic: true, size: 2048})); message.channel.send(embed); }; diff --git a/src/commands/softban.js b/src/commands/softban.js index ca95e60..1b602c5 100644 --- a/src/commands/softban.js +++ b/src/commands/softban.js @@ -71,7 +71,7 @@ exports.run = async (client, message, args) => { if (channel) { let embed = new Discord.MessageEmbed(); embed.setColor("#F38159"); - embed.setAuthor("User softbanned!", user.user.avatarURL({format: "png", dynamic: true})); + embed.setAuthor("User softbanned!", user.user.avatarURL({format: "png", dynamic: true, size: 2048})); embed.setDescription( `• User: ${user.user.tag} (${user.user.id})\n• Mod: ${message.author} (${message.author.id})\n• Days cleared: ${days}` ); diff --git a/src/commands/takerole.js b/src/commands/takerole.js index 4a11fa6..408d0e3 100644 --- a/src/commands/takerole.js +++ b/src/commands/takerole.js @@ -59,7 +59,7 @@ exports.run = async (client, message, [member, ...role2add], query) => { if (channel) { let embed = new Discord.MessageEmbed(); embed.setColor("#008369"); - embed.setAuthor("Role taken:", user.user.avatarURL({format: "png", dynamic: true})); + embed.setAuthor("Role taken:", user.user.avatarURL({format: "png", dynamic: true, size: 2048})); embed.setDescription(`‏‏‎• User: ${user} (${user.user.id})\n‏‏‎• Mod: ${message.author} (${message.author.id})\n‏‏‎• Role: ${gRole}`) try { channel.send({ embed }); diff --git a/src/commands/unmute.js b/src/commands/unmute.js index 448df4d..abf38f1 100644 --- a/src/commands/unmute.js +++ b/src/commands/unmute.js @@ -63,7 +63,7 @@ exports.run = async (client, message, args, level) => { if (channel) { let embed = new Discord.MessageEmbed(); embed.setColor("#7a2f8f"); - embed.setAuthor("User unmuted!", user.user.avatarURL({format: "png", dynamic: true})); + embed.setAuthor("User unmuted!", user.user.avatarURL({format: "png", dynamic: true, size: 2048})); embed.setDescription(`• User: ${user} (${user.user.id})\n• Mod: ${message.author} (${message.author.id})`) try { channel.send({ embed }); diff --git a/src/commands/userinfo.js b/src/commands/userinfo.js index 1ad7ec0..7514de5 100644 --- a/src/commands/userinfo.js +++ b/src/commands/userinfo.js @@ -61,13 +61,13 @@ exports.run = (client, message, args) => { id = user.user.id; tag = user.user.tag; colour = user.displayHexColor; - avurl = user.user.avatarURL({format: "png", dynamic: true}); + avurl = user.user.avatarURL({format: "png", dynamic: true, size: 2048}); createdAt = user.user.createdAt; } else { id = user.id; tag = user.tag; colour = ["#ff9d68", "#ff97cb", "#d789ff", "#74FFFF"].random(); - avurl = user.avatarURL({format: "png", dynamic: true}); + avurl = user.avatarURL({format: "png", dynamic: true, size: 2048}); createdAt = user.createdAt; }; From 6bb1a160bd9074c841e7666279f553204c22deda Mon Sep 17 00:00:00 2001 From: mudkipscience Date: Mon, 16 Mar 2020 12:21:33 +1100 Subject: [PATCH 2/5] Update version.json --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index b6a4488..edc38f2 100644 --- a/version.json +++ b/version.json @@ -1,4 +1,4 @@ { - "number": "1.1.0", + "number": "1.1.1", "changelog": "**1.1.0 CHANGELOG:**\n> • Added `~softban`, bans and unbans a user to clear messages\n> • Added `~emoji`, enlarges custom emojis\n> • Added `~inspirobot`, generates an inspirational quote\n> • `~serverinfo` has been changed to be more consistent, and also now displays boosts and if the server is partnered and stuff\n> • `~userinfo` has been changed to be more consistent, also added some stuff\n> • `~about` has been changed, added a thumbnail and removed the description\n> • `~colour` has been changed, it can now generate colours from text\n> • `~hackban` no longer has its own embed\n> • `~eval` now logs to hastebin if output is too large\n> • role names are no longer case sensitive\n> • `~echo` renamed `~say`\n> • Users with the ADMINISTRATOR permission now automatically recieve woomy admin\n> • Fixed `~flip`, `~purge`, `~bohemian_rhapsody` and `~creeper`\n> • Guild join/leave messages no longer include the guild name\n> • Some emojis have been changed\n> • Woomy now supports discord.js v12\n> • Files have been restructured\n> • Logger now logs error stack\n> • Restart now exits with code 0" } From 55d66f348d423decc5ddf29357b6c455cb896799 Mon Sep 17 00:00:00 2001 From: mudkipscience Date: Tue, 24 Mar 2020 05:47:26 +0000 Subject: [PATCH 3/5] Fixed woomy in DM's --- src/events/message.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/events/message.js b/src/events/message.js index 3505c1c..8904399 100644 --- a/src/events/message.js +++ b/src/events/message.js @@ -152,7 +152,7 @@ module.exports = async (client, message) => { .then(m => m.delete(2000)); }; - if (!perms.has('SEND_MESSAGES')) { + if (message.guild && !perms.has('SEND_MESSAGES')) { return message.author.send(`<:error:466995152976871434> I don't have permission to speak in **#${message.channel.name}**, Please ask a moderator to give me the send messages permission!`); }; @@ -224,4 +224,4 @@ module.exports = async (client, message) => { client.logger.cmd(`${client.config.permLevels.find(l => l.level === level).name} ${message.author.username} (${message.author.id}) ran command ${cmd.help.name}`); cmd.run(client, message, args, level); -}; \ No newline at end of file +}; From 51e307b3d63689646e9f40a52fe66a837882f5b0 Mon Sep 17 00:00:00 2001 From: mudkipscience Date: Tue, 24 Mar 2020 05:47:41 +0000 Subject: [PATCH 4/5] Update version.json --- version.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.json b/version.json index edc38f2..b7c8929 100644 --- a/version.json +++ b/version.json @@ -1,4 +1,4 @@ { - "number": "1.1.1", + "number": "1.1.2", "changelog": "**1.1.0 CHANGELOG:**\n> • Added `~softban`, bans and unbans a user to clear messages\n> • Added `~emoji`, enlarges custom emojis\n> • Added `~inspirobot`, generates an inspirational quote\n> • `~serverinfo` has been changed to be more consistent, and also now displays boosts and if the server is partnered and stuff\n> • `~userinfo` has been changed to be more consistent, also added some stuff\n> • `~about` has been changed, added a thumbnail and removed the description\n> • `~colour` has been changed, it can now generate colours from text\n> • `~hackban` no longer has its own embed\n> • `~eval` now logs to hastebin if output is too large\n> • role names are no longer case sensitive\n> • `~echo` renamed `~say`\n> • Users with the ADMINISTRATOR permission now automatically recieve woomy admin\n> • Fixed `~flip`, `~purge`, `~bohemian_rhapsody` and `~creeper`\n> • Guild join/leave messages no longer include the guild name\n> • Some emojis have been changed\n> • Woomy now supports discord.js v12\n> • Files have been restructured\n> • Logger now logs error stack\n> • Restart now exits with code 0" } From 7fdeceee670d0d495f74810908f7ce415aacc67c Mon Sep 17 00:00:00 2001 From: mudkipscience Date: Tue, 24 Mar 2020 09:05:32 +0000 Subject: [PATCH 5/5] Made readme friendlier --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 693f553..d0fde98 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,16 @@ # Woomy -Woomy is a all-purpose discord bot built off the [guidebot](https://github.com/AnIdiotsGuide/guidebot) base and coded in node.js using discord.js. +Woomy is a all-purpose discord bot built off the [guidebot](https://github.com/AnIdiotsGuide/guidebot) base and coded in node.js using discord.js. # How to use The easiest way to use Woomy is to invite it to your server with [this link.](https://discordapp.com/oauth2/authorize?client_id=435961704145485835&permissions=2134240503&scope=bot) It is hosted 24/7 and automatically updates itself when a new release is made available, making sure you always get the newest features. -Self hosting is generally not recommended, but instructions are provided below if you still wish to do so. Woomy's code will need to be modified before it will run on your machine. +You can also self-host! Some modificatiomns to the code will need to be made before Woomy will run on your machine, but anyone who can read errors will figure out what needs to be changed pretty quickly :P # Requirements - git - node.js v12.0.0 or higher - node-gyp build tools -- ffmpeg +- ffmpeg (or ffmpeg-static) # Installation - Clone Woomy to your machine @@ -18,4 +18,4 @@ Self hosting is generally not recommended, but instructions are provided below i - Open config.js in your code editor and insert all the required information # Contributing -If you wish to contribute to Woomy, please fork the repository and open a pull request. +If you wish to contribute to Woomy, please fork the repository and open a pull request. Any contribution is appreciated <3