changed error handling to not return error when database returns null as sometimes we want that

This commit is contained in:
Aster Fialla
2026-02-15 15:57:08 -05:00
parent ba623b0b78
commit 9bff32456c
3 changed files with 41 additions and 48 deletions

View File

@@ -24,8 +24,10 @@ wh.sendMessageAsMember = async function(client, message, content) {
if (!message.guildId) {
throw new Error(enums.err.NOT_IN_SERVER);
}
const member = await memberHelper.getMemberByProxy(message.author.id, proxyMatch.proxy).catch(e =>{throw e});
await replaceMessage(client, message, message.channelId, proxyMatch.message, member).catch(e =>{throw e});
const member = await memberHelper.getMemberByProxy(message.author.id, proxyMatch.proxy);
if (member) {
await replaceMessage(client, message, message.channelId, proxyMatch.message, member).catch(e =>{throw e});
}
}
/**