mirror of
https://github.com/arthur-pbty/xiao.git
synced 2026-06-03 23:36:43 +02:00
Split Image and Avatar Types
This commit is contained in:
@@ -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'
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
@@ -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'
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
@@ -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'
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
@@ -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'
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
@@ -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'
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
@@ -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'
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
@@ -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'
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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'
|
||||
}
|
||||
]
|
||||
});
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
@@ -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 })
|
||||
}
|
||||
]
|
||||
|
||||
+1
-1
@@ -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",
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
};
|
||||
+6
-7
@@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user