Add Void difficulty and publish changelogs
Some checks failed
Deploy MineGeo to Dokploy / deploy (push) Failing after 3m40s
Some checks failed
Deploy MineGeo to Dokploy / deploy (push) Failing after 3m40s
This commit is contained in:
21
lib/changelog.ts
Normal file
21
lib/changelog.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import "server-only";
|
||||
import { readChangelogFeed } from "./changelog-feed";
|
||||
|
||||
export async function getChangelog(before?: string) {
|
||||
const token = process.env.DISCORD_BOT_TOKEN?.trim();
|
||||
if (!token) return { entries: [], unavailable: true };
|
||||
try {
|
||||
return {
|
||||
...(await readChangelogFeed({
|
||||
token,
|
||||
before,
|
||||
channel: process.env.DISCORD_NEWS_CHANNEL_ID?.trim() || undefined,
|
||||
webhookId: process.env.DISCORD_RELEASE_WEBHOOK_ID?.trim() || undefined,
|
||||
})),
|
||||
unavailable: false,
|
||||
};
|
||||
} catch {
|
||||
// Do not expose Discord details or credentials to the public page.
|
||||
return { entries: [], unavailable: true };
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user