Download the PHP package skinnybot/skinny without Composer

On this page you can find all versions of the php package skinnybot/skinny. 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 skinny

Skinny Bot

Skinny Logo

Travis Coverage Codacy StyleCI Stable Version Downloads License
Build Status Coverage Codacy StyleCI Latest Stable Version Total Downloads License

A framework to create discord bot in PHP using DiscordPHP.

Note

This is the core of the Bot. The skeleton of the application can be found there.

Installation

If you just want to use and/or develop your own bot, you should use the Skinny Skeleton as a base for your project. Installation steps can be found there.

Requirements

Documentation

Summary

Core

Creating news Modules

The bot come with a Module system and a Module manager that allow you to create Modules for your custom commands. Your module must implement the Skinny\Module\ModuleInterface.

Here is the default template for a module, named Basic for example :

src/Module/Modules/Basic.php

With these 3 functions you can handle every messages on discord :

For example if we want to do a !say [text] command, we could do that in the onCommandMessage function :

Then we need to add this command in the config/commands.php file :

That's all, you did a !say command.

The variable $message

This variable is created by the class Skinny\Message\Message and is an array. For example with the phrase !dev param1 param2 param3 etc, we will have the following array :

The object $wrapper

The object is an instance of the class Skinny\Network\Wrapper and is used as a wrapper to split all the Discord's classes for a better accessibility and clarity when developing modules.

For example, doing a debug() on this object would generate the following output :

The Module System

As i said before, this bot implement a Module system. The Module system work like that in debug mode only : The Module system load the file's contents first, then use preg_replace() to replace the original class-name with a random one. After that, its create a copy and include it.

When a message is triggered, the module system will do some tests on it to ensure it's a valid message, then it will dispath it into all the loaded modules.

Plugins

Yes, you can create plugins for this bot. While i recommend to create a plugin using composer you can also create a plugin without using composer, it can be usefull when you develop a plugin. You can find the demo plugin named Basic here.

Creating a Plugin with composer

Creating a plugin with composer is easy. First you must create a composer.json file like this :

Note : The type of the composer file must be skinny-plugin, else your plugin won't work. The hierarchical structure of the files will be like this :

When you have finished to code your plugin, you must of course publish it on Packagist.

Creating a Plugin without composer

When you create a plugin without composer, your plugins must be in the plugins folder. Let's create the same Basic plugin without composer, the hierarchical structure of the files will be like this :

After you have created your plugin, you must tell to composer to do the dumpautoload event, so the plugin will be registered in the vendor/skinny-plugins.php file and it will update your autoloader :

After that, you will need to load the plugin in the config/bootstrap.php file in your application :

Others

Core plugins list

Contribute

Follow this guide to contribute

Special Thanks


All versions of skinny with dependencies

PHP Build Version
Package Version
Requires php Version >=7.3
skinnybot/plugin-installer Version ~2.0
charlottedunois/yasmin Version ^0.6.2
envms/fluentpdo Version ^2.1.0
cakephp/chronos Version ^1.2
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 skinnybot/skinny contains the following files

Loading the files please wait ....