fix(bots/discord): correct respondToReply logic

This commit is contained in:
PalmDevs
2025-09-25 23:17:29 +07:00
parent 6885e18976
commit 6fe15301a2

View File

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