From 5c6b76b59b79064eee24120742b14bb5e972c17d Mon Sep 17 00:00:00 2001 From: Aster Fialla Date: Sat, 14 Feb 2026 22:14:13 -0500 Subject: [PATCH] made setexpirationwarning not async --- src/helpers/memberHelper.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/helpers/memberHelper.js b/src/helpers/memberHelper.js index 2e6d86f..22d16d5 100644 --- a/src/helpers/memberHelper.js +++ b/src/helpers/memberHelper.js @@ -54,7 +54,7 @@ mh.parseMemberCommand = async function(authorId, authorFull, args, attachmentUrl case 'proxy': return await mh.updateProxy(authorId, args).catch((e) =>{throw e}); case 'propic': - return await mh.updatePropic(authorId, args, attachmentUrl).catch((e) =>{throw e}); + return await mh.updatePropic(authorId, args, attachmentUrl, attachmentExpiration).catch((e) =>{throw e}); default: return member; } @@ -168,11 +168,11 @@ mh.updateProxy = async function(authorId, args) { * @param {string} authorId - The author of the message * @param {string[]} args - The message arguments * @param {string} attachmentUrl - The url of the first attachment in the message - * @param {string} attachmentExpiry - The expiration date of the first attachment in the message + * @param {string | null} attachmentExpiry - The expiration date of the first attachment in the message (if uploaded to Fluxer) * @returns {Promise} A successful update. * @throws {Error} When loading the profile picture from a URL doesn't work. */ -mh.updatePropic = async function(authorId, args, attachmentUrl, attachmentExpiry) { +mh.updatePropic = async function(authorId, args, attachmentUrl, attachmentExpiry= null) { if (args[1] && args[1] === "--help") { return enums.help.PROPIC; } @@ -302,7 +302,7 @@ mh.updateMemberField = async function(authorId, args) { * @param {string} expirationString - An expiration date string. * @returns {string} A description of the expiration, interpolating the expiration string. */ -mh.setExpirationWarning = async function(expirationString) { +mh.setExpirationWarning = function(expirationString) { let expirationDate = new Date(expirationString); if (!isNaN(expirationDate.valueOf())) { expirationDate = expirationDate.toDateString();