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:
Essem 2022-08-03 20:54:07 -05:00
parent b0f4c16d50
commit 4265e3e914
No known key found for this signature in database
GPG key ID: 7D497397CC3A2A8C
22 changed files with 128 additions and 88 deletions

View file

@ -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;