mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-11 13:56:15 +00:00
fix(bots/discord): correct respondToReply logic
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user