DiscordPHP-NHA Documentation

Bot

Table of Contents

Classes

AutoplayLoop
The autonomous LLM play loop: while `isAutoplayEnabled()`, every `$interval` seconds ask {@see AutoPlayer::step()} for the default agent's next move and queue it, posting the play-by-play ("thinking dialogue") to `$brainChannelId`.
ChannelRelay
Two-way bridge between the default agent and one Discord channel:
ChatCommands
The `!nha` prefix-command tree (MessageCommandClient) — the primary chat interface. Every subcommand here is also reachable as a `/nha` slash subcommand ({@see SlashCommands}); the handlers are the same {@see \NHA\Commands} methods.
Env
`.env` loading for the `bot.php` / `autoplay.php` entry points.
Replies
Shared plumbing for turning a {@see \NHA\Commands} promise into a chat or slash-command response, with a uniform `❌ <error>` on rejection.
SlashCommands
The slash-command interface — a second, equivalent surface over the same {@see \NHA\Commands} handlers as {@see ChatCommands}. Registered lazily once the application and gateway are both ready.
On this page

Search results