Added quality option to jpeg, adjusted CMakeLists, more tweaks
This commit is contained in:
parent
76fe5b6aa6
commit
715ed3bb7b
5 changed files with 26 additions and 14 deletions
|
@ -1,11 +1,19 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
|
||||
class JPEGCommand extends ImageCommand {
|
||||
static description = "Adds max JPEG compression to an image";
|
||||
static aliases = ["needsmorejpeg", "jpegify", "magik2", "morejpeg", "jpg"];
|
||||
params() {
|
||||
const quality = parseInt(this.args[0]);
|
||||
return {
|
||||
quality: isNaN(quality) ? 1 : Math.max(1, Math.min(quality, 100))
|
||||
};
|
||||
}
|
||||
|
||||
static description = "Adds JPEG compression to an image";
|
||||
static aliases = ["needsmorejpeg", "jpegify", "magik2", "morejpeg", "jpg", "quality"];
|
||||
static arguments = ["{quality}"];
|
||||
|
||||
static noImage = "You need to provide an image to add more JPEG!";
|
||||
static command = "jpeg";
|
||||
}
|
||||
|
||||
export default JPEGCommand;
|
||||
export default JPEGCommand;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import ImageCommand from "../../classes/imageCommand.js";
|
||||
import { random } from "../../utils/misc.js";
|
||||
const names = ["esmBot", "me_irl", "dankmemes", "hmmm", "gaming", "wholesome", "chonkers", "memes", "funny", "pcmasterrace", "bellybros"];
|
||||
const names = ["esmBot", "me_irl", "dankmemes", "hmmm", "gaming", "wholesome", "chonkers", "memes", "funny", "pcmasterrace", "thomastheplankengine"];
|
||||
|
||||
class RedditCommand extends ImageCommand {
|
||||
params() {
|
||||
|
@ -16,4 +16,4 @@ class RedditCommand extends ImageCommand {
|
|||
static command = "reddit";
|
||||
}
|
||||
|
||||
export default RedditCommand;
|
||||
export default RedditCommand;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue