Enhance bot and WebUI functionality with new features and environment updates

- Added support for new environment variables in `.env.example` for public site and legal operator information.
- Integrated core commands into the bot's command structure for improved functionality.
- Implemented a new `publishBotStatus` function to update bot status in Redis, enhancing monitoring capabilities.
- Updated the landing page to include features, invite links, and support server access, improving user experience.
- Enhanced localization with new keys for core commands and landing page elements in both English and German.
- Improved error handling and logging for bot presence updates and status publishing.
This commit is contained in:
smueller
2026-07-22 16:47:09 +02:00
parent 0b4ac0da29
commit 4852f16f79
32 changed files with 1579 additions and 83 deletions

View File

@@ -0,0 +1,14 @@
import { NextResponse } from 'next/server';
import { getPublicStats } from '@/lib/public-stats';
export async function GET() {
try {
const stats = await getPublicStats();
return NextResponse.json(stats, {
headers: { 'Cache-Control': 'public, s-maxage=30, stale-while-revalidate=60' }
});
} catch (error) {
console.error('[public/stats]', error);
return NextResponse.json({ error: 'Failed to load stats' }, { status: 500 });
}
}

View File

@@ -0,0 +1,14 @@
import { NextResponse } from 'next/server';
import { getPublicStatus } from '@/lib/public-status';
export async function GET() {
try {
const status = await getPublicStatus();
return NextResponse.json(status, {
headers: { 'Cache-Control': 'public, s-maxage=15, stale-while-revalidate=30' }
});
} catch (error) {
console.error('[public/status]', error);
return NextResponse.json({ error: 'Failed to load status' }, { status: 500 });
}
}