mirror of
https://github.com/mudler/LocalAI.git
synced 2026-11-06 12:33:16 -05:00
People talk to a saved agent from Discord, in direct messages and where the bot is mentioned in a channel or thread. The add-on keeps one Gateway link per bot token (discordgo runs hello, identify, heartbeats and resume), queues the messages that address the bot, and hands them to the host's poll. It sends, edits, splits at 2000 characters, moves files by handle (10 MB), and reads thread history. Safe defaults: guild channels answer only on a mention or reply, or in a thread the bot follows; bots, webhooks and system messages are never read; every message carries allowed_mentions with an empty parse list and mentions in model text are broken up; a thread's chat is its parent channel so an allowlist of channels covers it. No typing indicator, no reactions, no embeds, no slash commands. Tests use a fake Gateway (hello, identify, ready, resume, heartbeat ack, message and thread events, reconnect, close codes) and a fake REST server (429 with Retry-After, create, edit, upload, history, CDN). The page has its own node tests and a browser spec. Assisted-by: Claude:claude-sonnet-5-5 go