new regex

This commit is contained in:
ChomeNS 2022-12-06 16:40:11 +07:00
parent 894f4a16ca
commit 69fa38a808

View file

@ -6,7 +6,7 @@ function inject (bot, client, target) {
!data.message?.startsWith('/') &&
!data.message?.startsWith('.')
) {
const codeParsedMessage = data.message.replace(/%.*%/g, (code) => {
const codeParsedMessage = data.message.replace(/%[^%]+%/g, (code) => {
try {
// eslint-disable-next-line no-eval
return eval(code.substring(1).slice(0, -1))