Fixed avatar arg issue, fixed motivate bottom text

This commit is contained in:
Essem 2021-12-30 14:27:18 -06:00
parent e66f45ba0f
commit 1a76d4d0c4
No known key found for this signature in database
GPG Key ID: 7D497397CC3A2A8C
3 changed files with 3 additions and 2 deletions

View File

@ -7,7 +7,7 @@ class AvatarCommand extends Command {
} else if (await this.ipc.fetchUser(this.args[0])) {
const user = await this.ipc.fetchUser(this.args[0]);
return user.avatar ? this.client._formatImage(`/avatars/${user.id}/${user.avatar}`, null, 1024) : `https://cdn.discordapp.com/embed/avatars/${user.discriminator % 5}.png`; // hacky "solution"
} else if (this.args[0].match(/^<?[@#]?[&!]?\d+>?$/) && this.args[0] >= 21154535154122752) {
} else if (this.args[0] && this.args[0].match(/^<?[@#]?[&!]?\d+>?$/) && this.args[0] >= 21154535154122752) {
try {
const user = await this.client.getRESTUser(this.args[0]);
return user.avatar ? this.client._formatImage(`/avatars/${user.id}/${user.avatar}`, null, 1024) : `https://cdn.discordapp.com/embed/avatars/${user.discriminator % 5}.png`; // repeat of hacky "solution" from above

View File

@ -58,7 +58,7 @@ Napi::Value Motivate(const Napi::CallbackInfo &info) {
bottom.fontPointsize(28);
bottom.read("pango:<span font_family=\"" +
(font == "roboto" ? "Roboto Condensed" : font) +
"\" foreground='white'>" + top_text + "</span>");
"\" foreground='white'>" + bottom_text + "</span>");
bottom.extent(Geometry(to_string(bottom.columns()) + "x" +
to_string(bottom.rows() + 20)),
"black", Magick::NorthGravity);

View File

@ -3,6 +3,7 @@
"version": "1.6.4",
"description": "A Discord bot with miscellaneous features",
"exports": "./app.js",
"bin": "./app.js",
"type": "module",
"engines": {
"node": ">=15"