mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-10 13:26:16 +00:00
fix(bots/discord): correct respondToReply logic
This commit is contained in:
@@ -33,14 +33,12 @@ withContext(on, 'messageCreate', async (context, msg) => {
|
||||
if (response) {
|
||||
logger.debug('Response found')
|
||||
|
||||
const toReply = msg.reference?.messageId && (
|
||||
respondToReply === true
|
||||
? true
|
||||
: (respondToReply === 'only_labeled' && label !== undefined) ||
|
||||
(respondToReply === 'only_regex' && label === undefined)
|
||||
)
|
||||
? await msg.fetchReference()
|
||||
: msg
|
||||
const toReply =
|
||||
msg.reference?.messageId &&
|
||||
(respondToReply === true ||
|
||||
(label === undefined ? respondToReply === 'only_regex' : respondToReply === 'only_labeled'))
|
||||
? await msg.fetchReference()
|
||||
: msg
|
||||
|
||||
const reply = await toReply.reply({
|
||||
...response,
|
||||
|
||||
Reference in New Issue
Block a user