mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-25 12:11:03 +00:00
feat(bots/discord): add additional options for respondToReply
This commit is contained in:
@@ -33,7 +33,15 @@ withContext(on, 'messageCreate', async (context, msg) => {
|
||||
if (response) {
|
||||
logger.debug('Response found')
|
||||
|
||||
const toReply = respondToReply ? (msg.reference?.messageId ? await msg.fetchReference() : msg) : msg
|
||||
const toReply = (
|
||||
respondToReply === true
|
||||
? true
|
||||
: (respondToReply === 'only_labeled' && label !== undefined) ||
|
||||
(respondToReply === 'only_regex' && label === undefined)
|
||||
)
|
||||
? await msg.fetchReference()
|
||||
: msg
|
||||
|
||||
const reply = await toReply.reply({
|
||||
...response,
|
||||
embeds: response.embeds?.map(createMessageScanResponseEmbed),
|
||||
|
||||
Reference in New Issue
Block a user