Files
.github
doc
scripts
test
test_db.ts
gen-version.ts
src
test
.gitignore
.prettierrc.yml
CHANGELOG
LICENSE
README.md
electron.vite.config.ts
icon.jpg
manifest.json
package.json
tsconfig.json
LLOneBot/scripts/test/test_db.ts
2024-04-30 11:24:33 +08:00

18 lines
379 B
TypeScript

import { Level } from 'level'
const db = new Level(process.env['level_db_path'], { valueEncoding: 'json' })
async function getGroupNotify() {
let keys = await db.keys().all()
let result = []
for (const key of keys) {
// console.log(key)
if (key.startsWith('group_notify_')) {
result.push(key)
}
}
return result
}
getGroupNotify().then(console.log)