fix(bots/discord)!: rename config replyToReplied to respondToReply

This commit is contained in:
PalmDevs
2024-08-02 18:28:13 +07:00
parent 9fe6b4ca70
commit 8fe78e424e
2 changed files with 3 additions and 3 deletions

View File

@@ -69,7 +69,7 @@ export type ConfigMessageScanResponse = {
}
filterOverride?: NonNullable<Config['messageScan']>['filter']
response: ConfigMessageScanResponseMessage | null
replyToReplied?: boolean
respondToReply?: boolean
}
export type ConfigMessageScanResponseLabelConfig = {

View File

@@ -24,7 +24,7 @@ withContext(on, 'messageCreate', async (context, msg) => {
try {
logger.debug(`Classifying message ${msg.id}`)
const { response, label, replyToReplied } = await getResponseFromText(
const { response, label, respondToReply } = await getResponseFromText(
msg.content,
filteredResponses,
context,
@@ -33,7 +33,7 @@ withContext(on, 'messageCreate', async (context, msg) => {
if (response) {
logger.debug('Response found')
const toReply = replyToReplied ? (msg.reference?.messageId ? await msg.fetchReference() : msg) : msg
const toReply = respondToReply ? (msg.reference?.messageId ? await msg.fetchReference() : msg) : msg
const reply = await toReply.reply({
...response,
embeds: response.embeds?.map(it => createMessageScanResponseEmbed(it, label ? 'nlp' : 'match')),