Download the PHP package eurobertics/nebucord without Composer

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

Nebucord - Discord WebSocket and REST API

GitHub Release GitHub Development GitHub license Security Rating Quality Gate Status

SonarCloud

This is another implementation of the Discord API. It implements an HTTP WebSocket client as well as a REST API.
An actual in use sample can be found on our Discord server: Nebulatien Discord

If you need help or have questions, don't hestiate to contact Me. Best done if you join the above mentioned Discord server or (if you found something) create an issue in Github. Also pull request for fixes of course are welcome.

Of course not fully finished is it still able to do the most important things. This includes:

Default and available parameters

Parameter Config name INI config name Default value
Bot token token bottoken (string)empty
ACL user snowflakes ctrluser acl (array)[]
WS connection retries wsretries websocket.retries (integer)3
Default GW intent bitmask* intents intents.* (integer)3276541 / (boolean)true*
DM on failures dmonfailures websocket.dmonfailures (boolean)true

*Note:
The intent bitmask defaults to be everything is true except GUILD_MEMBERS, GUILD_PRESENCES, GUILD_MESSAGES and MESSAGE_CONTENT. These four options has to be manual set to true and they have to be activated in the Bot preferences on the Discord application management webpage. The bitmask is 3276799 if everything set to true or for config as parameter.

Note:
Configuration by parameter has priority to configuration by .ini file.

Requirements

Additional Composer packages are required in order to run Nebucord.
Of course these can also be installed without Composer, but you have to include the SPL autoloader of the packages as well.

The recommended way is to use Composer.

Package informations:

Install

By composer:


By Docker (more information can be found on Nebucord Docker Hub):


By GitHub Packages (more information can be found on GitHub Pulling container images):

Note:
If you want use .ini configuration, you have to put your .ini File (nebucord.ini i. e.) in the mounted directory for your Docker instance and set the path to the path of the docker working directory. You can find more information about this on the Nebucord Docker Hub Page.


By GIT:
Simple clone this repository and use the native autoloader file in ./src Directory.

Note: If you use the library without composer, you just can include the native autoloader:

Note: You have to include the native autoloader of the dependencie packages as well. See package dependencies above.


Example usage - WebSocket API

The WebSocket API is designed to run as a PHP CLI program.

Usage websocket API, minimalistic example:

'your_bot_token': The auth token of your bot (from the Discord Dev-Portal)

'controluser-snowflake': The snowflake of Discord user(s) who can issue control commands such like 'shutdown' to the bot.

Of course this only starts the bot and this one sits there and does nothing.

A more complex example:

The above example prints out every message which was seen by the bot (based on the bot roles on the Discord guild). "Seen" means all CREATE_MESSAGE events from the Discord gateway.

Now on a console:

Example usage - REST API

Basic usage for sending a message:

"$message_model" is an object with the answer from the REST gateway.

Basic usage for receiving guild channels:

"$channels" is an array of channel models for processing.

createRESTExecutor() returns an object which can be re-used for creating REST request.
It is also possible to create a REST request with createRESTAction(string Nebucord_RESTStatus::REST_*, ModelREST $restmodel) instead of createRESTActionFromArray(string Nebucord_RESTStatus::REST_*, array $restparams) and pass a predefined ModelREST object with all params for the REST gateway.

More info

For more information see: Discord Developer Portal


All versions of nebucord with dependencies

PHP Build Version
Package Version
Requires php Version ^7.0
ext-json Version *
eurobertics/connfetti-ini Version *
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 eurobertics/nebucord contains the following files

Loading the files please wait ....