mirror of
https://github.com/xHyroM/bun-discord-bot.git
synced 2024-11-10 01:08:07 +01:00
fix: load tags correctly, updatel lilybird
This commit is contained in:
parent
0549763a3e
commit
cda50448db
3 changed files with 4 additions and 5 deletions
BIN
bun.lockb
BIN
bun.lockb
Binary file not shown.
|
@ -16,7 +16,7 @@
|
||||||
"@paperdave/logger": "^3.0.1",
|
"@paperdave/logger": "^3.0.1",
|
||||||
"algoliasearch": "^4.19.1",
|
"algoliasearch": "^4.19.1",
|
||||||
"gray-matter": "^4.0.3",
|
"gray-matter": "^4.0.3",
|
||||||
"lilybird": "^0.4.1",
|
"lilybird": "0.4.2",
|
||||||
"zlib-sync": "^0.1.8"
|
"zlib-sync": "^0.1.8"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,14 +12,13 @@ import { Glob } from "bun";
|
||||||
|
|
||||||
type PartialGuildTextChannel = PartialChannel<GuildTextChannel>;
|
type PartialGuildTextChannel = PartialChannel<GuildTextChannel>;
|
||||||
|
|
||||||
const tags = Array.from(
|
const TAGS_PATH = join(import.meta.dir, "..", "..", "data", "tags");
|
||||||
new Glob(join(import.meta.dir, "..", "..", "data", "tags", "*.md")).scanSync()
|
const tags = Array.from(new Glob("*.md").scanSync(TAGS_PATH));
|
||||||
);
|
|
||||||
|
|
||||||
export const TAGS: Tag[] = [];
|
export const TAGS: Tag[] = [];
|
||||||
|
|
||||||
for (const tag of tags) {
|
for (const tag of tags) {
|
||||||
const content = readFileSync(tag);
|
const content = readFileSync(join(TAGS_PATH, tag));
|
||||||
const frontMatter = matter(content);
|
const frontMatter = matter(content);
|
||||||
|
|
||||||
TAGS.push({
|
TAGS.push({
|
||||||
|
|
Loading…
Reference in a new issue