PHPackages                             discord-php/slash - 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. discord-php/slash

AbandonedArchivedLibrary

discord-php/slash
=================

HTTP server for Discord slash commands

v1.0.5(4y ago)322.0k↓100%12[1 issues](https://github.com/discord-php/DiscordPHP-Slash/issues)MITPHPPHP &gt;=7.3|&gt;=8.0

Since Jan 1Pushed 3y ago3 watchersCompare

[ Source](https://github.com/discord-php/DiscordPHP-Slash)[ Packagist](https://packagist.org/packages/discord-php/slash)[ RSS](/packages/discord-php-slash/feed)WikiDiscussions master Synced today

READMEChangelog (8)Dependencies (10)Versions (10)Used By (0)

DiscordPHP-Slash
================

[](#discordphp-slash)

PHP server and client for Discord slash commands. Please read the [Discord slash command documentation](https://discord.com/developers/docs/interactions/slash-commands) before using this library.

> **If you are already using [DiscordPHP](https://github.com/discord-php/DiscordPHP) v7+ you DO NOT need this DiscordPHP-Slash library**. Read more here:

Warning
-------

[](#warning)

Discord slash commands are still in beta. Expect the way these commands work to change at any time without notice. Same goes for this library.

Requirements
------------

[](#requirements)

- PHP &gt;=7.3
- Composer

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

[](#installation)

```
$ composer require discord-php/slash

```

Usage
-----

[](#usage)

There are two "clients" in the library:

- `Discord\Slash\RegisterClient` used for registering commands with Discord.
- `Discord\Slash\Client` used for listening for HTTP requests and responding.

### `Discord\Slash\RegisterClient`

[](#discordslashregisterclient)

You should read up on how commands are registered in the [Discord Developer Documentation](https://discord.com/developers/docs/interactions/slash-commands#registering-a-command), specifically the `options` array when creating and updating commands.

```
