mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-11 13:56:15 +00:00
feat(bots/discord): react to label classified response
This commit is contained in:
@@ -1,3 +1,4 @@
|
|||||||
|
import { MessageScanLabeledResponseReactions } from '$/constants'
|
||||||
import { responses } from '$/database/schemas'
|
import { responses } from '$/database/schemas'
|
||||||
import { getResponseFromText, messageMatchesFilter } from '$/utils/discord/messageScan'
|
import { getResponseFromText, messageMatchesFilter } from '$/utils/discord/messageScan'
|
||||||
import { createMessageScanResponseEmbed } from '$utils/discord/embeds'
|
import { createMessageScanResponseEmbed } from '$utils/discord/embeds'
|
||||||
@@ -47,6 +48,8 @@ withContext(on, 'messageCreate', async (context, msg) => {
|
|||||||
label,
|
label,
|
||||||
content: msg.content,
|
content: msg.content,
|
||||||
})
|
})
|
||||||
|
|
||||||
|
await Promise.all(Object.values(MessageScanLabeledResponseReactions).map(name => reply.react(name)))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user