PHPackages                             tempcord/framework - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. tempcord/framework

ActiveLibrary[Framework](/categories/framework)

tempcord/framework
==================

A modern, elegant PHP framework for building Discord bots with ease

07[2 issues](https://github.com/Tempcord/framework/issues)PHP

Since Sep 12Pushed 4mo agoCompare

[ Source](https://github.com/Tempcord/framework)[ Packagist](https://packagist.org/packages/tempcord/framework)[ RSS](/packages/tempcord-framework/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

Tempcord Framework
==================

[](#tempcord-framework)

[![Version](https://camo.githubusercontent.com/aa68040ac8e390babb6d71570d9a55c6bd0e44864946f6b2b275ae2745bd66ec/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f76657273696f6e2d302e352e302d626c75652e737667)](https://github.com/tempcord/framework)[![License](https://camo.githubusercontent.com/8bb50fd2278f18fc326bf71f6e88ca8f884f72f179d3e555e20ed30157190d0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e737667)](LICENSE)[![PHP Version](https://camo.githubusercontent.com/e69fc10ad0d3845d44d08b0eeedd6dd7a5bfa4ab872e68e26b131554122d35d5/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545382e332d626c75652e737667)](https://php.net)[![Build Status](https://camo.githubusercontent.com/c27a457659b89ee4f1f80f7995c559dd37f2051bde7167ad25791e5c5c92cc8e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6275696c642d70617373696e672d627269676874677265656e2e737667)](#)

Description
-----------

[](#description)

Tempcord is a modern, elegant PHP framework designed specifically for building Discord bots with ease. Built on top of the powerful Tempest Console framework and Ragnarok Fenrir Discord library, Tempcord provides a clean, attribute-based approach to creating sophisticated Discord bots with minimal boilerplate code.

The framework leverages PHP 8.3+ features and modern development practices to deliver a robust foundation for Discord bot development, featuring automatic command registration, event handling, and seamless integration with Discord's API.

> **Getting Started**: Use the `tempcord/tempcord` boilerplate to quickly create new Discord bot applications. This repository contains the core framework - for building applications, use `composer create-project tempcord/tempcord your-bot-name`.

Features
--------

[](#features)

- 🚀 **Modern PHP 8.3+** - Leverages the latest PHP features and syntax
- 🎯 **Attribute-Based Commands** - Define Discord commands using PHP attributes
- 📡 **Event-Driven Architecture** - Handle Discord events with clean, organized handlers
- 🔧 **Auto-Discovery** - Automatic command and event registration
- 🏗️ **Dependency Injection** - Built-in container for clean architecture
- 📝 **Console Integration** - Rich console output and logging capabilities
- 🔌 **Extensible** - Easy to extend with custom functionality
- 🛡️ **Type Safety** - Full type hints and strict typing throughout
- 📊 **Logging Support** - Comprehensive logging with multiple channels
- ⚡ **Performance Optimized** - Efficient command and event handling

Installation
------------

[](#installation)

### Prerequisites

[](#prerequisites)

- PHP 8.3 or higher
- Composer
- A Discord Bot Token (from [Discord Developer Portal](https://discord.com/developers/applications))

### Step 1: Create New Application

[](#step-1-create-new-application)

Use the Tempcord application boilerplate to create a new Discord bot project:

```
composer create-project tempcord/tempcord my-discord-bot
cd my-discord-bot
```

### Step 2: Configure Your Bot

[](#step-2-configure-your-bot)

Copy the example environment file and configure your bot:

```
cp .env.example .env
```

Edit the `.env` file with your Discord bot credentials:

```
DISCORD_TOKEN=your_bot_token_here
```

### Step 3: Install Dependencies

[](#step-3-install-dependencies)

```
composer install
```

### Step 4: Create Your First Command

[](#step-4-create-your-first-command)

The boilerplate includes example commands. Create a new command in any folder, for example inside `app/Commands/`:

```
