diff --git a/commands/blur.js b/commands/blur.js
index a92fb67..f79120a 100644
--- a/commands/blur.js
+++ b/commands/blur.js
@@ -1,10 +1,14 @@
-const sharp = require("sharp");
+const gm = require("gm").subClass({
+ imageMagick: true
+});
+const gmToBuffer = require("../utils/gmbuffer.js");
exports.run = async (message) => {
message.channel.sendTyping();
const image = await require("../utils/imagedetect.js")(message);
if (image === undefined) return `${message.author.mention}, you need to provide an image to blur!`;
- const resultBuffer = await sharp(image.data).blur(5).toBuffer();
+ const command = gm(image.data).blur(10);
+ const resultBuffer = await gmToBuffer(command);
return message.channel.createMessage("", {
file: resultBuffer,
name: `blur.${image.type}`
diff --git a/commands/donate.js b/commands/donate.js
new file mode 100644
index 0000000..48ebfe3
--- /dev/null
+++ b/commands/donate.js
@@ -0,0 +1,8 @@
+
+exports.run = async () => {
+ return "Like esmBot? Consider supporting the developer on Patreon to help keep it running! https://patreon.com/TheEssem";
+};
+
+exports.aliases = ["support", "patreon", "patrons"];
+exports.category = 1;
+exports.help = "Learn more about how you can support esmBot's development";
\ No newline at end of file
diff --git a/commands/sharpen.js b/commands/sharpen.js
index 4331616..0af3400 100644
--- a/commands/sharpen.js
+++ b/commands/sharpen.js
@@ -1,13 +1,17 @@
-const sharp = require("sharp");
+const gm = require("gm").subClass({
+ imageMagick: true
+});
+const gmToBuffer = require("../utils/gmbuffer.js");
exports.run = async (message) => {
message.channel.sendTyping();
const image = await require("../utils/imagedetect.js")(message);
if (image === undefined) return `${message.author.mention}, you need to provide an image to sharpen!`;
- const resultBuffer = await sharp(image.data).sharpen(5).toBuffer();
+ const command = gm(image.data).sharpen(10);
+ const resultBuffer = await gmToBuffer(command);
return message.channel.createMessage("", {
file: resultBuffer,
- name: "sharpen.png"
+ name: `sharpen.${image.type}`
});
};
diff --git a/utils/help.js b/utils/help.js
index f672f93..83b37f0 100644
--- a/utils/help.js
+++ b/utils/help.js
@@ -1,7 +1,9 @@
const collections = require("./collections.js");
const logger = require("./logger.js");
const fs = require("fs");
-const template = `# esmBot${process.env.NODE_ENV === "development" ? " Dev" : ""} Command List
+
+module.exports = async (output) => {
+ const template = `# esmBot${process.env.NODE_ENV === "development" ? " Dev" : ""} Command List
${process.env.NODE_ENV === "development" ? "\n**You are currently using esmBot Dev! Things may change at any time without warning and there will be bugs. Many bugs. If you find one, [report it here](https://github.com/TheEssem/esmBot/issues) or in the esmBot Support server.**\n" : ""}
\`[]\` means an argument is required, \`{}\` means an argument is optional.
@@ -17,8 +19,6 @@ Default prefix is \`&\`.
+ [**Image Editing**](#🖼️-image-editing)
+ [**Soundboard**](#🔊-soundboard)
`;
-
-module.exports = async (output) => {
const commands = Array.from(collections.commands.keys());
const categories = {
general: ["## 💻 General"],