laracord/framework
Laracord Framework is the core of Laracord, a Laravel-powered micro-framework for building Discord bots with DiscordPHP. Includes generators for commands/events, slash command sync, interaction routing, async services/tasks, optional HTTP server, and great logging.
composer require laracord/frameworkphp artisan vendor:publish --provider="Laracord\Framework\Providers\FrameworkServiceProvider" — this creates config/laracord.php with defaults (token, intents, command prefix)php artisan make:command PingCommand — extend Laracord\Framework\Commands\Command and implement handle()php artisan laracord:run — the framework boots a Laravel CLI context with Discord’s ReactPHP event loop--debug flag to enable verbose output during developmentapp/Commands/ with auto-discoveryHttp, Cache) into command constructors — full Laravel DI works.env (use DISCORD_BOT_TOKEN), configure per-environment via config/laracord.phplaracord.php to preprocess commands (e.g., permission checks)php artisan make:command CommandHandler with @listen attributes to handle MessageCreated, InteractionCreate, etc.dump(), dd(), and tests seamlesslytokenable user feature to attach user context to HTTP requests via Http facade or HttpClient (e.g., $this->http->withToken($this->user->token)->get(...)). Useful for OAuth flows or user-specific API calls.react/promise/guzzle/react-adapter for async requestsDISCORD_BOT_TOKEN must have both bot scope and correct guild permissions — verify in Discord Developer PortalCache or external DB for shared state (not server memory)React\EventLoop\Loop::run() manually — the framework manages this; doing so causes silent hangs--verbose flag to see full stack traces for command errors, or set debug to true in configCommandRunner) by binding interfaces in AppServiceProviderLaracord\Framework\Testing\DiscordTest traittokenable user feature, ensure your commands extend Laracord\Framework\Commands\AuthCommand (if available) or manually resolve the user context via $this->getUser() in your command. Verify the user’s token permissions before making authenticated requests.How can I help you explore Laravel packages today?