Files
sansenhoshiandClaude b61d09f09f Add HeXi bot codebase: custom plugins, web frontends, tests
- hexi core: message handling, rate limiting, cooldown, plugin manager
- Custom plugins: BF stats, daily check-in, quotes, persona cards, etc.
- Community plugins vendored under hexi/plugins with local fixes
- Web admin frontends (learning-chat, persona-admin), unified hexi/web
- Tests for rate_limit/cooldown/memes/persona; poetry.lock

Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-01 13:13:40 +08:00

17 lines
829 B
Python

from nonebot import get_plugin_config
from pydantic import BaseModel
class Config(BaseModel):
# 自托管 helldivers-2/api 的根地址;不填则使用公共社区 API
hd2_api_base_url: str = "https://api.helldivers2.dev"
# 请求的本地化语言。自托管实例默认配置支持 zh-Hans(简体)/ zh-Hant(繁体)
hd2_api_language: str = "zh-Hans"
# 数据缓存秒数。战况快照约几分钟更新一次,靠这个避免频繁打接口触发限流(5次/10秒)
hd2_cache_ttl: int = 60
# 请求头标识。公共/自托管都要求 X-Super-Client 和 X-Super-Contact 两个头同时存在(缺失返回 400)
hd2_super_client: str = "hexi-bot.local"
hd2_super_contact: str = "https://github.com/sansenhoshi/nonebot_plugin_helldivers_tools"
config = get_plugin_config(Config)