Download the PHP package commandstring/dphp-bot without Composer

On this page you can find all versions of the php package commandstring/dphp-bot. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package dphp-bot

DiscordPHP Bot Template

An unofficial way to structure a discordPHP bot.

Table of Contents

Installation

Important Resources

DiscordPHP Class Reference

DiscordPHP Documentation

DiscordPHP Discord Server Only ask questions relevant to DiscordPHP's own wrapper, not on how to use this.

Developer Hub Issues about this template can be asked here

Configuration

Copy the .env.example file to .env and add your bot token.

Slash Commands

Create a class that implements Core\Commands\CommandHandler and attach the Core\Commands\Command attribute to it.

Once you start the bot, it will automatically register the command with Discord. And if you make any changes to the config, it will update the command on the fly.

Events

Create a class that implements any of the interfaces found inside of Core\Events. Implement the interface that matches your desired event.

If the interface doesn't exist use the Class Reference. Just create a interface that has a handle methods with args that match up with the ones in the event. Then sit it inside /Core/Events

Disabling Commands and Events

If you want to disable a command handler or event listener attach the Core\Commands\Disabled attribute to it.

Extending The Template

Bootstrap Sequence

Create a file inside /Bootstrap and then require it inside of /Boostrap/Requires.php.

Environment Variables

Add a doc comment to /Core/Env.php and then add the variable to .env

You should also add it to .env.example


All versions of dphp-bot with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
commandstring/utils Version ^1.7
react/async Version ^4.1
team-reflex/discord-php Version dev-master
tnapf/env Version ^1.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package commandstring/dphp-bot contains the following files

Loading the files please wait ....