XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 1
UTF-8
# Discord bot token from https://discord.com/developers/applications
DISCORD_TOKEN=your-bot-token-here

# g4f model to use (default: gpt-4o-mini)
G4F_MODEL=gpt-4o-mini

# Optional system prompt
G4F_SYSTEM_PROMPT=You are a helpful, friendly Discord assistant. Keep answers concise and formatted with Discord markdown when useful.

# Max conversation history messages per user (default: 12)
G4F_MAX_HISTORY=12

# Optional proxy, e.g. socks5://127.0.0.1:1080
# G4F_PROXY=

# MCP tools: comma-separated list of tools to enable at startup.
# Default (if unset): web_search,web_scrape,mark_it_down,text_to_audio,image_generation
# Full set: web_search,web_scrape,image_generation,text_to_audio,mark_it_down,
#           python_execute,apply_patch,file_read,file_read_lines,file_search,
#           file_write,file_list,file_delete
# G4F_ENABLED_TOOLS=web_search,web_scrape,image_generation

# Max tool-calling rounds before forcing a final answer (default: 4)
# G4F_MAX_TOOL_LOOPS=4

# Auto-translation: comma-separated channel IDs where the bot will
# auto-translate every non-bot message to English and reply with the
# translation.  Leave unset to disable.
# G4F_TRANSLATE_CHANNELS=123456789012345678,987654321098765432

# Honeypot channels: comma-separated channel IDs where slash commands
# are silently blocked.  Useful for announcement or trap channels where
# you don't want command spam.
# G4F_HONEYPOT_CHANNELS=111111111111111111

# ---------------------------------------------------------------------------
# Live feed
# ---------------------------------------------------------------------------
# When G4F_LIVE_FEED_CHANNEL is set, the bot posts a live activity feed
# to that Discord channel:
#   - 🖼️  thumbnails of generated images
#   - 🔧  tool calls (web search, scraping, image gen, ...)
#   - 📝  file edits (apply_patch, file_write, file_delete)
#   - ⚡  heavy token usage completions
#   - 🚨  server errors (5xx)
#   - 👋  new g4f.dev users
#   - 📊  periodic activity summaries
#
# Leave unset to disable the feed.
# G4F_LIVE_FEED_CHANNEL=123456789012345678

# Base URL of the g4f API server (where /api/logs is served).
# G4F_API_BASE=http://localhost:8080

# Public base URL for Discord-accessible image/thumbnail links.
# Defaults to G4F_API_BASE. Set this if the API server is behind a tunnel
# or reverse proxy and Discord needs a different host to fetch images.
# G4F_PUBLIC_BASE=https://your-public-host.example

# g4f.dev base URL for new-user announcements. Set to empty to disable.
# G4F_MEMBERS_BASE=https://g4f.dev

# Seconds between feed polls (default: 15).
# G4F_FEED_POLL_INTERVAL=15

# Token count that flags a completion as "heavy" (default: 10000).
# G4F_HEAVY_TOKEN_THRESHOLD=10000

# Seconds between activity summaries (default: 3600 = 1 hour).
# G4F_FEED_SUMMARY_INTERVAL=3600

# Max embeds posted per poll cycle (default: 5). Prevents spam if many
# events arrive at once.
# G4F_FEED_MAX_POSTS_PER_CYCLE=5