Add uncanny, detect filename from image link
This commit is contained in:
parent
e9a9680a7d
commit
f3eea0d96a
18 changed files with 183 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue