diff --git a/commands/analyze/dominant-color.js b/commands/analyze/dominant-color.js index a61cec22..b9ba11f6 100644 --- a/commands/analyze/dominant-color.js +++ b/commands/analyze/dominant-color.js @@ -19,8 +19,7 @@ module.exports = class DominantColorCommand extends Command { { key: 'image', prompt: 'What image would you like to test?', - type: 'image', - default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) + type: 'image-or-avatar' } ] }); diff --git a/commands/analyze/face.js b/commands/analyze/face.js index dc8969e3..f7f339b1 100644 --- a/commands/analyze/face.js +++ b/commands/analyze/face.js @@ -29,7 +29,7 @@ module.exports = class FaceCommand extends Command { { key: 'image', prompt: 'What face would you like to scan?', - type: 'image' + type: 'image-or-avatar' } ] }); diff --git a/commands/analyze/has-transparency.js b/commands/analyze/has-transparency.js index 7f357a7c..0da3a3ea 100644 --- a/commands/analyze/has-transparency.js +++ b/commands/analyze/has-transparency.js @@ -19,8 +19,7 @@ module.exports = class HasTransparencyCommand extends Command { { key: 'image', prompt: 'What image would you like to test?', - type: 'image', - default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) + type: 'image-or-avatar' } ] }); diff --git a/commands/analyze/image-size.js b/commands/analyze/image-size.js index 4a129228..f222e316 100644 --- a/commands/analyze/image-size.js +++ b/commands/analyze/image-size.js @@ -18,8 +18,7 @@ module.exports = class ImageSizeCommand extends Command { { key: 'image', prompt: 'What image would you like to get the size of?', - type: 'image', - default: msg => msg.author.displayAvatarURL({ format: 'png', size: 2048 }) + type: 'image-or-avatar' } ] }); diff --git a/commands/analyze/ocr.js b/commands/analyze/ocr.js index 54ac099e..381ae72d 100644 --- a/commands/analyze/ocr.js +++ b/commands/analyze/ocr.js @@ -19,8 +19,7 @@ module.exports = class OcrCommand extends Command { { key: 'image', prompt: 'What image would you like to perform OCR on?', - type: 'image', - default: msg => msg.author.displayAvatarURL({ format: 'png', size: 2048 }) + type: 'image-or-avatar' } ] }); diff --git a/commands/analyze/read-qr-code.js b/commands/analyze/read-qr-code.js index a4399eba..9d044ab2 100644 --- a/commands/analyze/read-qr-code.js +++ b/commands/analyze/read-qr-code.js @@ -22,7 +22,7 @@ module.exports = class ReadQRCodeCommand extends Command { { key: 'image', prompt: 'What QR Code would you like to read?', - type: 'image' + type: 'image-or-avatar' } ] }); diff --git a/commands/analyze/what-anime.js b/commands/analyze/what-anime.js index effaf013..103d856d 100644 --- a/commands/analyze/what-anime.js +++ b/commands/analyze/what-anime.js @@ -24,8 +24,7 @@ module.exports = class WhatAnimeCommand extends Command { { key: 'screenshot', prompt: 'What screenshot do you want to scan?', - type: 'image', - default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) + type: 'image' } ] }); diff --git a/commands/edit-image/approved.js b/commands/edit-image/approved.js index e525a2a2..05c38fbe 100644 --- a/commands/edit-image/approved.js +++ b/commands/edit-image/approved.js @@ -29,7 +29,7 @@ module.exports = class ApprovedCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/blur.js b/commands/edit-image/blur.js index fda83491..e4e6531d 100644 --- a/commands/edit-image/blur.js +++ b/commands/edit-image/blur.js @@ -27,7 +27,7 @@ module.exports = class BlurCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/bob-ross.js b/commands/edit-image/bob-ross.js index e156b650..45730023 100644 --- a/commands/edit-image/bob-ross.js +++ b/commands/edit-image/bob-ross.js @@ -34,7 +34,7 @@ module.exports = class BobRossCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/brazzers.js b/commands/edit-image/brazzers.js index 133a22d5..5389c4e8 100644 --- a/commands/edit-image/brazzers.js +++ b/commands/edit-image/brazzers.js @@ -27,7 +27,7 @@ module.exports = class BrazzersCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/charcoal.js b/commands/edit-image/charcoal.js index d325a9e2..9d4813de 100644 --- a/commands/edit-image/charcoal.js +++ b/commands/edit-image/charcoal.js @@ -26,7 +26,7 @@ module.exports = class CharcoalCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/circle.js b/commands/edit-image/circle.js index 0bad04c9..9fb2a73c 100644 --- a/commands/edit-image/circle.js +++ b/commands/edit-image/circle.js @@ -19,7 +19,7 @@ module.exports = class CircleCommand extends Command { { key: 'image', prompt: 'Which image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/communist.js b/commands/edit-image/communist.js index a1d002be..8b661c97 100644 --- a/commands/edit-image/communist.js +++ b/commands/edit-image/communist.js @@ -29,7 +29,7 @@ module.exports = class CommunistCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/contrast.js b/commands/edit-image/contrast.js index 5da1f077..97ef18e4 100644 --- a/commands/edit-image/contrast.js +++ b/commands/edit-image/contrast.js @@ -19,7 +19,7 @@ module.exports = class ContrastCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/convert-image.js b/commands/edit-image/convert-image.js index ec3d9a2d..115d3e98 100644 --- a/commands/edit-image/convert-image.js +++ b/commands/edit-image/convert-image.js @@ -15,7 +15,7 @@ module.exports = class ConvertImageCommand extends Command { aliases: ['convert-img', 'image-convert', 'img-convert'], group: 'edit-image', memberName: 'convert-image', - description: 'Converts an image or user\'s avatar from one format to another.', + description: 'Converts an image from one format to another.', details: `**Formats:** ${Object.keys(formats).join(', ')}`, throttling: { usages: 1, @@ -33,8 +33,7 @@ module.exports = class ConvertImageCommand extends Command { { key: 'image', prompt: 'Which image would you like to edit?', - type: 'image', - default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) + type: 'image' } ] }); diff --git a/commands/edit-image/desaturate.js b/commands/edit-image/desaturate.js index 63ec3d04..c738fd65 100644 --- a/commands/edit-image/desaturate.js +++ b/commands/edit-image/desaturate.js @@ -25,7 +25,7 @@ module.exports = class DesaturateCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/dexter.js b/commands/edit-image/dexter.js index 90d8e991..1f5bd260 100644 --- a/commands/edit-image/dexter.js +++ b/commands/edit-image/dexter.js @@ -27,7 +27,7 @@ module.exports = class DexterCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 256 }) } ] diff --git a/commands/edit-image/distort.js b/commands/edit-image/distort.js index 78c7a167..178fa7ea 100644 --- a/commands/edit-image/distort.js +++ b/commands/edit-image/distort.js @@ -24,7 +24,7 @@ module.exports = class DistortCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/emboss.js b/commands/edit-image/emboss.js index 3c4ea383..b5ba812b 100644 --- a/commands/edit-image/emboss.js +++ b/commands/edit-image/emboss.js @@ -26,7 +26,7 @@ module.exports = class EmbossCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/fire-frame.js b/commands/edit-image/fire-frame.js index df0ac046..152caa26 100644 --- a/commands/edit-image/fire-frame.js +++ b/commands/edit-image/fire-frame.js @@ -29,7 +29,7 @@ module.exports = class FireFrameCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/fish-eye.js b/commands/edit-image/fish-eye.js index be8b8939..4d21a492 100644 --- a/commands/edit-image/fish-eye.js +++ b/commands/edit-image/fish-eye.js @@ -34,7 +34,7 @@ module.exports = class FishEyeCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/frame.js b/commands/edit-image/frame.js index 05f75382..d71471d2 100644 --- a/commands/edit-image/frame.js +++ b/commands/edit-image/frame.js @@ -28,7 +28,7 @@ module.exports = class FrameCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/ghost.js b/commands/edit-image/ghost.js index cafc133f..d46a6829 100644 --- a/commands/edit-image/ghost.js +++ b/commands/edit-image/ghost.js @@ -18,7 +18,7 @@ module.exports = class GhostCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/glass-shatter.js b/commands/edit-image/glass-shatter.js index 7d573311..4be91b92 100644 --- a/commands/edit-image/glass-shatter.js +++ b/commands/edit-image/glass-shatter.js @@ -28,7 +28,7 @@ module.exports = class GlassShatterCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/glitch.js b/commands/edit-image/glitch.js index 9c30df7c..5a1f629b 100644 --- a/commands/edit-image/glitch.js +++ b/commands/edit-image/glitch.js @@ -19,7 +19,7 @@ module.exports = class GlitchCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/greyscale.js b/commands/edit-image/greyscale.js index a331dbca..63415090 100644 --- a/commands/edit-image/greyscale.js +++ b/commands/edit-image/greyscale.js @@ -20,7 +20,7 @@ module.exports = class GreyscaleCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/gun.js b/commands/edit-image/gun.js index 6f1eabec..18898e5d 100644 --- a/commands/edit-image/gun.js +++ b/commands/edit-image/gun.js @@ -32,7 +32,7 @@ module.exports = class GunCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/hands.js b/commands/edit-image/hands.js index 234acf37..941d0325 100644 --- a/commands/edit-image/hands.js +++ b/commands/edit-image/hands.js @@ -33,7 +33,7 @@ module.exports = class HandsCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/ifunny.js b/commands/edit-image/ifunny.js index 4320e21f..7b23ec7a 100644 --- a/commands/edit-image/ifunny.js +++ b/commands/edit-image/ifunny.js @@ -26,7 +26,7 @@ module.exports = class IfunnyCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/implode.js b/commands/edit-image/implode.js index 3912fba0..84fec87c 100644 --- a/commands/edit-image/implode.js +++ b/commands/edit-image/implode.js @@ -33,7 +33,7 @@ module.exports = class ImplodeCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/invert.js b/commands/edit-image/invert.js index c82f4ac6..86b4c993 100644 --- a/commands/edit-image/invert.js +++ b/commands/edit-image/invert.js @@ -19,7 +19,7 @@ module.exports = class InvertCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/lego-icon.js b/commands/edit-image/lego-icon.js index 1467b3dc..3dabd946 100644 --- a/commands/edit-image/lego-icon.js +++ b/commands/edit-image/lego-icon.js @@ -34,7 +34,7 @@ module.exports = class LegoIconCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/liquid-rescale.js b/commands/edit-image/liquid-rescale.js index 09978f27..84393b43 100644 --- a/commands/edit-image/liquid-rescale.js +++ b/commands/edit-image/liquid-rescale.js @@ -27,7 +27,7 @@ module.exports = class LiquidRescaleCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/mirror.js b/commands/edit-image/mirror.js index 5265f23f..02eea1d0 100644 --- a/commands/edit-image/mirror.js +++ b/commands/edit-image/mirror.js @@ -27,7 +27,7 @@ module.exports = class MirrorCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/motion-blur.js b/commands/edit-image/motion-blur.js index 5a8029c1..dafbc47a 100644 --- a/commands/edit-image/motion-blur.js +++ b/commands/edit-image/motion-blur.js @@ -20,7 +20,7 @@ module.exports = class MotionBlurCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/needs-more-jpeg.js b/commands/edit-image/needs-more-jpeg.js index c7b739d9..6d598e83 100644 --- a/commands/edit-image/needs-more-jpeg.js +++ b/commands/edit-image/needs-more-jpeg.js @@ -27,7 +27,7 @@ module.exports = class NeedsMoreJpegCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/noise.js b/commands/edit-image/noise.js index 4b6e663e..a24c28b4 100644 --- a/commands/edit-image/noise.js +++ b/commands/edit-image/noise.js @@ -35,7 +35,7 @@ module.exports = class NoiseCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/oil-painting.js b/commands/edit-image/oil-painting.js index 3f3ba9e8..e0e76df2 100644 --- a/commands/edit-image/oil-painting.js +++ b/commands/edit-image/oil-painting.js @@ -27,7 +27,7 @@ module.exports = class OilPaintingCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/pet.js b/commands/edit-image/pet.js index c72a66e9..e696a9e7 100644 --- a/commands/edit-image/pet.js +++ b/commands/edit-image/pet.js @@ -23,7 +23,7 @@ module.exports = class PetCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 128 }) } ] diff --git a/commands/edit-image/pixelize.js b/commands/edit-image/pixelize.js index 25aaec28..30b2607d 100644 --- a/commands/edit-image/pixelize.js +++ b/commands/edit-image/pixelize.js @@ -20,7 +20,7 @@ module.exports = class PixelizeCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/police-tape.js b/commands/edit-image/police-tape.js index 4545a19d..b5a6b750 100644 --- a/commands/edit-image/police-tape.js +++ b/commands/edit-image/police-tape.js @@ -29,7 +29,7 @@ module.exports = class PoliceTapeCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/rainbow.js b/commands/edit-image/rainbow.js index cf6d3d2b..3ad083d8 100644 --- a/commands/edit-image/rainbow.js +++ b/commands/edit-image/rainbow.js @@ -20,7 +20,7 @@ module.exports = class RainbowCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/rejected.js b/commands/edit-image/rejected.js index 553b80d8..bf4f28cc 100644 --- a/commands/edit-image/rejected.js +++ b/commands/edit-image/rejected.js @@ -29,7 +29,7 @@ module.exports = class RejctedCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/resize.js b/commands/edit-image/resize.js index e0cf39b2..d65fcadb 100644 --- a/commands/edit-image/resize.js +++ b/commands/edit-image/resize.js @@ -32,7 +32,7 @@ module.exports = class ResizeCommand extends Command { { key: 'image', prompt: 'Which image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 2048 }) } ] diff --git a/commands/edit-image/sepia.js b/commands/edit-image/sepia.js index 2f6362ac..5b203d5c 100644 --- a/commands/edit-image/sepia.js +++ b/commands/edit-image/sepia.js @@ -19,7 +19,7 @@ module.exports = class SepiaCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/silhouette.js b/commands/edit-image/silhouette.js index 9a4db9ab..058ea816 100644 --- a/commands/edit-image/silhouette.js +++ b/commands/edit-image/silhouette.js @@ -19,7 +19,7 @@ module.exports = class SilhouetteCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/simp.js b/commands/edit-image/simp.js index 06777579..ae6dd047 100644 --- a/commands/edit-image/simp.js +++ b/commands/edit-image/simp.js @@ -33,7 +33,7 @@ module.exports = class SimpCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/sketch.js b/commands/edit-image/sketch.js index 36bf62e7..8941e13b 100644 --- a/commands/edit-image/sketch.js +++ b/commands/edit-image/sketch.js @@ -27,7 +27,7 @@ module.exports = class SketchCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/spotify-now-playing.js b/commands/edit-image/spotify-now-playing.js index 8c719a4f..61cc2539 100644 --- a/commands/edit-image/spotify-now-playing.js +++ b/commands/edit-image/spotify-now-playing.js @@ -60,7 +60,7 @@ module.exports = class SpotifyNowPlayingCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 256 }) } ] diff --git a/commands/edit-image/square.js b/commands/edit-image/square.js index 1e26ecd5..3ea17e15 100644 --- a/commands/edit-image/square.js +++ b/commands/edit-image/square.js @@ -18,7 +18,7 @@ module.exports = class SquareCommand extends Command { { key: 'image', prompt: 'Which image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/squish.js b/commands/edit-image/squish.js index 34f3bcce..47d7d871 100644 --- a/commands/edit-image/squish.js +++ b/commands/edit-image/squish.js @@ -34,7 +34,7 @@ module.exports = class SquishCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/steam-card.js b/commands/edit-image/steam-card.js index f8fd962c..2f758313 100644 --- a/commands/edit-image/steam-card.js +++ b/commands/edit-image/steam-card.js @@ -49,7 +49,7 @@ module.exports = class SteamCardCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 256 }) } ] diff --git a/commands/edit-image/subtitle.js b/commands/edit-image/subtitle.js index 888bf9f0..10d9bd32 100644 --- a/commands/edit-image/subtitle.js +++ b/commands/edit-image/subtitle.js @@ -38,7 +38,7 @@ module.exports = class SubtitleCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/swirl.js b/commands/edit-image/swirl.js index f6969072..e44a2b42 100644 --- a/commands/edit-image/swirl.js +++ b/commands/edit-image/swirl.js @@ -33,7 +33,7 @@ module.exports = class SwirlCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/tint.js b/commands/edit-image/tint.js index 24f4723f..d7fd1d8f 100644 --- a/commands/edit-image/tint.js +++ b/commands/edit-image/tint.js @@ -25,7 +25,7 @@ module.exports = class TintCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/wanted.js b/commands/edit-image/wanted.js index e10f8c55..1aabfb71 100644 --- a/commands/edit-image/wanted.js +++ b/commands/edit-image/wanted.js @@ -29,7 +29,7 @@ module.exports = class WantedCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/wild-pokemon.js b/commands/edit-image/wild-pokemon.js index 282ca382..28c04516 100644 --- a/commands/edit-image/wild-pokemon.js +++ b/commands/edit-image/wild-pokemon.js @@ -46,7 +46,7 @@ module.exports = class WildPokemonCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 128 }) } ] diff --git a/commands/edit-image/you-died.js b/commands/edit-image/you-died.js index c06ed4c6..15c4a036 100644 --- a/commands/edit-image/you-died.js +++ b/commands/edit-image/you-died.js @@ -33,7 +33,7 @@ module.exports = class YouDiedCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-image/yu-gi-oh-gen.js b/commands/edit-image/yu-gi-oh-gen.js index a779094a..8d6d2673 100644 --- a/commands/edit-image/yu-gi-oh-gen.js +++ b/commands/edit-image/yu-gi-oh-gen.js @@ -69,7 +69,7 @@ module.exports = class YuGiOhGenCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 1024 }) } ] diff --git a/commands/edit-meme/3000-years.js b/commands/edit-meme/3000-years.js index 9e7ebd47..5e52613c 100644 --- a/commands/edit-meme/3000-years.js +++ b/commands/edit-meme/3000-years.js @@ -28,7 +28,7 @@ module.exports = class ThreeThousandYearsCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 256 }) } ] diff --git a/commands/edit-meme/challenger.js b/commands/edit-meme/challenger.js index 329aadd8..2a209ee2 100644 --- a/commands/edit-meme/challenger.js +++ b/commands/edit-meme/challenger.js @@ -41,7 +41,7 @@ module.exports = class ChallengerCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 256 }) } ] diff --git a/commands/edit-meme/deep-fry.js b/commands/edit-meme/deep-fry.js index 2a8c1b84..380c50b8 100644 --- a/commands/edit-meme/deep-fry.js +++ b/commands/edit-meme/deep-fry.js @@ -19,7 +19,7 @@ module.exports = class DeepFryCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-meme/demotivational.js b/commands/edit-meme/demotivational.js index f7943c12..05e06c07 100644 --- a/commands/edit-meme/demotivational.js +++ b/commands/edit-meme/demotivational.js @@ -45,7 +45,7 @@ module.exports = class DemotivationalCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-meme/dislike.js b/commands/edit-meme/dislike.js index 1b4d6cc1..d39d7f1f 100644 --- a/commands/edit-meme/dislike.js +++ b/commands/edit-meme/dislike.js @@ -33,7 +33,7 @@ module.exports = class DislikeCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 1024 }) } ] diff --git a/commands/edit-meme/enslaved.js b/commands/edit-meme/enslaved.js index 43425725..c5f284ad 100644 --- a/commands/edit-meme/enslaved.js +++ b/commands/edit-meme/enslaved.js @@ -43,7 +43,7 @@ module.exports = class EnslavedCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 256 }) } ] diff --git a/commands/edit-meme/for-five-hours.js b/commands/edit-meme/for-five-hours.js index 2625cd15..f0372ebd 100644 --- a/commands/edit-meme/for-five-hours.js +++ b/commands/edit-meme/for-five-hours.js @@ -33,7 +33,7 @@ module.exports = class ForFiveHoursCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 1024 }) } ] diff --git a/commands/edit-meme/girl-worth-fighting-for.js b/commands/edit-meme/girl-worth-fighting-for.js index a57a82da..b170a418 100644 --- a/commands/edit-meme/girl-worth-fighting-for.js +++ b/commands/edit-meme/girl-worth-fighting-for.js @@ -35,7 +35,7 @@ module.exports = class GirlWorthFightingForCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'iimage-or-avatarmage', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 256 }) } ] diff --git a/commands/edit-meme/i-fear-no-man.js b/commands/edit-meme/i-fear-no-man.js index 14254927..5c74b3a5 100644 --- a/commands/edit-meme/i-fear-no-man.js +++ b/commands/edit-meme/i-fear-no-man.js @@ -34,7 +34,7 @@ module.exports = class IFearNoManCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 256 }) } ] diff --git a/commands/edit-meme/kyon-gun.js b/commands/edit-meme/kyon-gun.js index 100eeddb..6d161cce 100644 --- a/commands/edit-meme/kyon-gun.js +++ b/commands/edit-meme/kyon-gun.js @@ -33,7 +33,7 @@ module.exports = class KyonGunCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-meme/like.js b/commands/edit-meme/like.js index 0d2a3dcb..b5619394 100644 --- a/commands/edit-meme/like.js +++ b/commands/edit-meme/like.js @@ -33,7 +33,7 @@ module.exports = class LikeCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 1024 }) } ] diff --git a/commands/edit-meme/look-at-this-photograph.js b/commands/edit-meme/look-at-this-photograph.js index 6a511da4..7bd306fe 100644 --- a/commands/edit-meme/look-at-this-photograph.js +++ b/commands/edit-meme/look-at-this-photograph.js @@ -28,7 +28,7 @@ module.exports = class LookAtThisPhotographCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 256 }) } ] diff --git a/commands/edit-meme/look-what-karen-have.js b/commands/edit-meme/look-what-karen-have.js index 74e857f0..fa4719a6 100644 --- a/commands/edit-meme/look-what-karen-have.js +++ b/commands/edit-meme/look-what-karen-have.js @@ -34,7 +34,7 @@ module.exports = class LookWhatKarenHaveCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-meme/meme-gen-classic.js b/commands/edit-meme/meme-gen-classic.js index 9eafb1c7..dfc4e083 100644 --- a/commands/edit-meme/meme-gen-classic.js +++ b/commands/edit-meme/meme-gen-classic.js @@ -55,7 +55,7 @@ module.exports = class MemeGenClassicCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 2048 }) } ] diff --git a/commands/edit-meme/meme-gen-modern.js b/commands/edit-meme/meme-gen-modern.js index 466192e2..94082e2d 100644 --- a/commands/edit-meme/meme-gen-modern.js +++ b/commands/edit-meme/meme-gen-modern.js @@ -53,7 +53,7 @@ module.exports = class MemeGenModernCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 1024 }) } ] diff --git a/commands/edit-meme/metamorphosis.js b/commands/edit-meme/metamorphosis.js index a0c59f26..726c1ed7 100644 --- a/commands/edit-meme/metamorphosis.js +++ b/commands/edit-meme/metamorphosis.js @@ -49,7 +49,7 @@ module.exports = class MetamorphosisCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 256 }) } ] diff --git a/commands/edit-meme/my-collection-grows.js b/commands/edit-meme/my-collection-grows.js index 8d67894e..c0debfaa 100644 --- a/commands/edit-meme/my-collection-grows.js +++ b/commands/edit-meme/my-collection-grows.js @@ -29,7 +29,7 @@ module.exports = class MyCollectionGrowsCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 256 }) } ] diff --git a/commands/edit-meme/nike-ad.js b/commands/edit-meme/nike-ad.js index b5b76e39..151ad290 100644 --- a/commands/edit-meme/nike-ad.js +++ b/commands/edit-meme/nike-ad.js @@ -49,7 +49,7 @@ module.exports = class NikeAdCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 2048 }) } ] diff --git a/commands/edit-meme/skyrim-skill.js b/commands/edit-meme/skyrim-skill.js index 1a8d9b2e..389b4102 100644 --- a/commands/edit-meme/skyrim-skill.js +++ b/commands/edit-meme/skyrim-skill.js @@ -42,7 +42,7 @@ module.exports = class SkyrimSkillCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 2048 }) } ] diff --git a/commands/edit-meme/sora-selfie.js b/commands/edit-meme/sora-selfie.js index acb9a5b6..aa114706 100644 --- a/commands/edit-meme/sora-selfie.js +++ b/commands/edit-meme/sora-selfie.js @@ -34,7 +34,7 @@ module.exports = class SoraSelfieCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-meme/this-guy.js b/commands/edit-meme/this-guy.js index 11b2e52e..30a3715c 100644 --- a/commands/edit-meme/this-guy.js +++ b/commands/edit-meme/this-guy.js @@ -29,7 +29,7 @@ module.exports = class ThisGuyCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 256 }) } ] diff --git a/commands/edit-meme/thug-life.js b/commands/edit-meme/thug-life.js index 88be050a..8d3e520c 100644 --- a/commands/edit-meme/thug-life.js +++ b/commands/edit-meme/thug-life.js @@ -29,7 +29,7 @@ module.exports = class ThugLifeCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 2048 }) } ] diff --git a/commands/edit-meme/to-be-continued.js b/commands/edit-meme/to-be-continued.js index b613ff35..b9c3a643 100644 --- a/commands/edit-meme/to-be-continued.js +++ b/commands/edit-meme/to-be-continued.js @@ -28,7 +28,7 @@ module.exports = class ToBeContinuedCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/commands/edit-meme/ultimate-tattoo.js b/commands/edit-meme/ultimate-tattoo.js index 4325e233..ffbb9653 100644 --- a/commands/edit-meme/ultimate-tattoo.js +++ b/commands/edit-meme/ultimate-tattoo.js @@ -34,7 +34,7 @@ module.exports = class UltimateTattooCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 256 }) } ] diff --git a/commands/edit-meme/vietnam-flashbacks.js b/commands/edit-meme/vietnam-flashbacks.js index 33686ec2..dc8fbad7 100644 --- a/commands/edit-meme/vietnam-flashbacks.js +++ b/commands/edit-meme/vietnam-flashbacks.js @@ -27,7 +27,7 @@ module.exports = class VietnamFlashbacksCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 2048 }) } ] diff --git a/commands/edit-meme/worthless.js b/commands/edit-meme/worthless.js index 23bf2cc0..bd884647 100644 --- a/commands/edit-meme/worthless.js +++ b/commands/edit-meme/worthless.js @@ -29,7 +29,7 @@ module.exports = class WorthlessCommand extends Command { { key: 'image', prompt: 'What image would you like to edit?', - type: 'image', + type: 'image-or-avatar', default: msg => msg.author.displayAvatarURL({ format: 'png', size: 512 }) } ] diff --git a/package.json b/package.json index d78b5347..d8cfac0b 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "custom-translate": "^2.2.8", "didyoumean2": "^4.1.0", "discord.js": "^12.5.1", - "discord.js-commando": "github:discordjs/Commando", + "discord.js-commando": "github:discordjs/Commando#dragonfire535-patch-1", "dotenv": "^8.2.0", "emoji-regex": "^9.2.1", "eslint": "^7.18.0", diff --git a/types/image-or-avatar.js b/types/image-or-avatar.js new file mode 100644 index 00000000..0b83e40b --- /dev/null +++ b/types/image-or-avatar.js @@ -0,0 +1,24 @@ +const { ArgumentType } = require('discord.js-commando'); + +module.exports = class ImageOrAvatarArgumentType extends ArgumentType { + constructor(client) { + super(client, 'image-or-avatar'); + } + + async validate(value, msg, arg) { + return this.client.registry.types.get('image').validate(value, msg, arg) + || this.client.registry.types.get('user').validate(value, msg, arg); + } + + async parse(value, msg, arg) { + const image = await this.client.registry.types.get('image').parse(value, msg, arg); + if (image) return image; + const user = await this.client.registry.types.get('user').parse(value, msg, arg); + return user.displayAvatarURL({ format: 'png', size: 512 }); + } + + isEmpty(value, msg, arg) { + return this.client.registry.types.get('image').isEmpty(value, msg, arg) + || this.client.registry.types.get('user').isEmpty(value, msg, arg); + } +}; diff --git a/types/image.js b/types/image.js index af0c167b..ca894f3d 100644 --- a/types/image.js +++ b/types/image.js @@ -8,7 +8,7 @@ module.exports = class ImageArgumentType extends ArgumentType { super(client, 'image'); } - async validate(value, msg, arg) { + async validate(value, msg) { const attachment = msg.attachments.first(); if (attachment) { if (attachment.size > 8e+6) return 'Please provide an image under 8 MB.'; @@ -24,19 +24,18 @@ module.exports = class ImageArgumentType extends ArgumentType { return false; } } - return this.client.registry.types.get('user').validate(value, msg, arg); + return false; } - async parse(value, msg, arg) { + async parse(value, msg) { const attachment = msg.attachments.first(); if (attachment) return attachment.url; if (fileTypeRe.test(value.toLowerCase())) return value; - const user = await this.client.registry.types.get('user').parse(value, msg, arg); - return user.displayAvatarURL({ format: 'png', size: 512 }); + return null; } - isEmpty(value, msg, arg) { + isEmpty(value, msg) { if (msg.attachments.size) return false; - return this.client.registry.types.get('user').isEmpty(value, msg, arg); + return true; } };