From 4400d27c48ea99b4a75855b8c7c0feca205c6505 Mon Sep 17 00:00:00 2001 From: Cynthia Foxwell Date: Sat, 7 Oct 2023 22:21:58 -0600 Subject: [PATCH 1/2] utility.appinfo: fix icon --- src/modules/utility.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/utility.js b/src/modules/utility.js index ac07802..cdd09e1 100644 --- a/src/modules/utility.js +++ b/src/modules/utility.js @@ -1441,7 +1441,7 @@ appinfo.callback = async function (msg, line) { if (app.icon) { embed.thumbnail = { - url: `${APP_ICON_BASE}/app-icons/${app.id}/${app.icon}.png?size=1024`, + url: `${APP_ICON_BASE}${app.id}/${app.icon}.png?size=1024`, }; } From ce7398c94a82492864a6dd492896207668dc4b83 Mon Sep 17 00:00:00 2001 From: Cynthia Foxwell Date: Sat, 7 Oct 2023 22:24:38 -0600 Subject: [PATCH 2/2] utils: fix snowflakeToTimestamp using wrong epoch --- src/lib/utils.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/lib/utils.js b/src/lib/utils.js index e4162fb..f510204 100644 --- a/src/lib/utils.js +++ b/src/lib/utils.js @@ -404,9 +404,10 @@ function getUploadLimit(guild) { const TWITTER_EPOCH = 1288834974657; const DISCORD_EPOCH = 1420070400000; function snowflakeToTimestamp(snowflake, twitter = false) { - return Math.floor(Number(snowflake) / Math.pow(2, 22)) + twitter - ? TWITTER_EPOCH - : DISCORD_EPOCH; + return ( + Math.floor(Number(snowflake) / Math.pow(2, 22)) + + (twitter == true ? TWITTER_EPOCH : DISCORD_EPOCH) + ); } module.exports = {