Add uncanny, detect filename from image link

This commit is contained in:
Essem 2022-07-30 16:00:09 -05:00
parent e9a9680a7d
commit f3eea0d96a
No known key found for this signature in database
GPG key ID: 7D497397CC3A2A8C
18 changed files with 183 additions and 2 deletions

View file

@ -72,6 +72,7 @@ class ImageCommand extends Command {
magickParams.path = image.path;
magickParams.params.type = image.type;
magickParams.url = image.url; // technically not required but can be useful for text filtering
magickParams.name = image.name;
if (this.constructor.requiresGIF) magickParams.onlyGIF = true;
} catch (e) {
runningCommands.delete(this.author.id);
@ -89,7 +90,7 @@ class ImageCommand extends Command {
switch (typeof this.params) {
case "function":
Object.assign(magickParams.params, this.params(magickParams.url));
Object.assign(magickParams.params, this.params(magickParams.url, magickParams.name));
break;
case "object":
Object.assign(magickParams.params, this.params);