// Produktseite des Bots: was er kann, wie er aussieht, wo es weitergeht. // Bewusst ohne „Einladen"-Button — der Bot ist auf einen Server ausgelegt. import { useEffect, useState } from 'react'; import { Link } from 'react-router-dom'; import { apiGet } from '../api.js'; import { useT } from '../i18n.jsx'; import { IconDevlog, IconLevel, IconRoles, IconServer, IconSupport, IconGiveaway, IconBirthday, IconShield, IconMagic, IconKey, IconArrowRight, IconBot, } from '../icons.jsx'; const HIGHLIGHTS = [ [IconDevlog, 'bot.hl.devlogs'], [IconServer, 'bot.hl.monitor'], [IconLevel, 'bot.hl.level'], [IconRoles, 'bot.hl.roles'], [IconSupport, 'bot.hl.support'], [IconShield, 'bot.hl.mod'], [IconGiveaway, 'bot.hl.giveaway'], [IconBirthday, 'bot.hl.birthday'], [IconMagic, 'bot.hl.welcome'], ]; export default function BotLanding() { const { t } = useT(); const [status, setStatus] = useState(null); const [hub, setHub] = useState(null); const [featureCount, setFeatureCount] = useState(null); useEffect(() => { // Nur verlinken, wenn der Hub wirklich woanders liegt apiGet('/api/legal').then((d) => setHub(d.split ? d.hubUrl : null)).catch(() => {}); apiGet('/api/serverstats').then(setStatus).catch(() => {}); // Zahl kommt aus dem Modul-Register, damit sie nicht veraltet apiGet('/api/features').then((d) => setFeatureCount(d.features.length)).catch(() => {}); window.scrollTo(0, 0); }, []); return ( <>
BOT
{featureCount && (
{featureCount} {t('bot.statFeatures')}
)}
18 {t('bot.statCommands')}
300+ {t('bot.statGames')}
0 {t('bot.statCost')}

{t('bot.whatItDoes')}

{HIGHLIGHTS.map(([Icon, key]) => (
{t(key)} {t(`${key}.text`)}
))}

{t('bot.forDevs')}

{t('bot.dev.api')} {t('bot.dev.api.text')}
{t('bot.dev.host')} {t('bot.dev.host.text')}
{hub && (

{status?.members ? t('bot.runsForWith', status.members) : t('bot.runsFor')} — {' '}{t('bot.toHub')}.

)}
); }