Make log files rotate, clean up separated text input, add more uncanny images, use a more reliable method to get the instance owner username
This commit is contained in:
parent
b0f4c16d50
commit
4265e3e914
22 changed files with 128 additions and 88 deletions
|
@ -81,20 +81,17 @@ class ImageCommand extends Command {
|
|||
}
|
||||
|
||||
if (this.constructor.requiresText) {
|
||||
const text = this.options.text ?? this.args;
|
||||
if (text.length === 0 || !await this.criteria(text)) {
|
||||
const text = this.options.text ?? this.args.join(" ").trim();
|
||||
if (text.length === 0 || !await this.criteria(text, magickParams.url)) {
|
||||
runningCommands.delete(this.author.id);
|
||||
return this.constructor.noText;
|
||||
}
|
||||
}
|
||||
|
||||
switch (typeof this.params) {
|
||||
case "function":
|
||||
Object.assign(magickParams.params, this.params(magickParams.url, magickParams.name));
|
||||
break;
|
||||
case "object":
|
||||
Object.assign(magickParams.params, this.params);
|
||||
break;
|
||||
if (typeof this.params === "function") {
|
||||
Object.assign(magickParams.params, this.params(magickParams.url, magickParams.name));
|
||||
} else if (typeof this.params === "object") {
|
||||
Object.assign(magickParams.params, this.params);
|
||||
}
|
||||
|
||||
let status;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue