From 1a76d4d0c4e21d709afdab34b935339b6d8dfafe Mon Sep 17 00:00:00 2001 From: Essem Date: Thu, 30 Dec 2021 14:27:18 -0600 Subject: [PATCH] Fixed avatar arg issue, fixed motivate bottom text --- commands/general/avatar.js | 2 +- natives/motivate.cc | 2 +- package.json | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/commands/general/avatar.js b/commands/general/avatar.js index 01d6d00..d75929a 100644 --- a/commands/general/avatar.js +++ b/commands/general/avatar.js @@ -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(/^?$/) && this.args[0] >= 21154535154122752) { + } else if (this.args[0] && this.args[0].match(/^?$/) && 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 diff --git a/natives/motivate.cc b/natives/motivate.cc index d8b99ec..a993dab 100644 --- a/natives/motivate.cc +++ b/natives/motivate.cc @@ -58,7 +58,7 @@ Napi::Value Motivate(const Napi::CallbackInfo &info) { bottom.fontPointsize(28); bottom.read("pango:" + top_text + ""); + "\" foreground='white'>" + bottom_text + ""); bottom.extent(Geometry(to_string(bottom.columns()) + "x" + to_string(bottom.rows() + 20)), "black", Magick::NorthGravity); diff --git a/package.json b/package.json index d8aeabf..24ad38f 100644 --- a/package.json +++ b/package.json @@ -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"