fix(bots/discord): only fetch reference when it exists when respondToReply is set

whoops, testing in production
This commit is contained in:
Palm
2025-09-14 00:34:00 +07:00
committed by GitHub
parent 51c0252b44
commit 42038e6b38

View File

@@ -33,7 +33,7 @@ withContext(on, 'messageCreate', async (context, msg) => {
if (response) { if (response) {
logger.debug('Response found') logger.debug('Response found')
const toReply = ( const toReply = msg.reference?.messageId && (
respondToReply === true respondToReply === true
? true ? true
: (respondToReply === 'only_labeled' && label !== undefined) || : (respondToReply === 'only_labeled' && label !== undefined) ||