Ignoring case in Docs regexp

This commit is contained in:
Nefrace 2021-03-17 22:43:36 +03:00 committed by GitHub
parent ddc1a587a0
commit 241a9e545a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -179,7 +179,7 @@ bot.onText(/(оффтоп|offtop)/i, async msg => {
Chat.updateOne({uid: msg.chat.id}, {$set: {lastOfftop: msgDate}}).exec()
})
bot.onText(/док(ументац[а-я]+|[а-я])? ((п)?о )?(?<topic>@?[\w\d]{4,32})/, async(msg, match) => {
bot.onText(/док(ументац[а-я]+|[а-я])? ((п)?о )?(?<topic>@?[\w\d]{4,32})/i, async(msg, match) => {
const chat = await getChat(msg.chat)
console.log(match.length, match, match[match.length-1])
const topic = match[match.length-1]
@ -495,4 +495,4 @@ async function processKarma(msg, match, settings={}) {
bot.sendMessage(chat_id, message, {parse_mode: "MarkdownV2"})
}
}
}
}