mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-30 14:41:03 +00:00
feat(bots/discord): add replyToReplied option in response config
This commit is contained in:
@@ -21,12 +21,13 @@ withContext(on, 'messageCreate', async (context, msg) => {
|
||||
try {
|
||||
logger.debug(`Classifying message ${msg.id}`)
|
||||
|
||||
const { response, label } = await getResponseFromText(msg.content, filteredResponses, context)
|
||||
const { response, label, replyToReplied } = await getResponseFromText(msg.content, filteredResponses, context)
|
||||
|
||||
if (response) {
|
||||
logger.debug('Response found')
|
||||
|
||||
const reply = await msg.reply({
|
||||
const toReply = replyToReplied ? await msg.fetchReference() : msg
|
||||
const reply = await toReply.reply({
|
||||
...response,
|
||||
embeds: response.embeds?.map(it => createMessageScanResponseEmbed(it, label ? 'nlp' : 'match')),
|
||||
})
|
||||
Reference in New Issue
Block a user