Download the PHP package louisgjbertrand/discordwebhook without Composer

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

Discord Webhook Sender

A simple & lightweight webhook sender.

Based on the code from this Stack exchange answer, this library is a lightweight Discord Webhook Event Sender that comes with two main functions.


Installation

run the following command in your project


Usage

Requirements

the buit-in CURL Library is required. please uncomment the curl library in your php.ini file

require the class in the php script you need it in.

Sending the event

you just have to use the Send function to send a message. only the url is required in this function.

you can use a pointer to store the json response from the discord api using the response param.

not all parameters are supported in the current state, but will be added later. It's mapping the discord webhook api.

note: tts is text to speech.

Generating embeded messages

you can create an array in order to create an embeded message using this function

putting the embeded message in an array is necessary since it's asked in the discord webhook documentation. the maximum embeded messages by webhook events is 10.

the function, to generate an embeded message follows the discord documentation.

in the future, arrays will be replaced by discord api objects but will still remain retro compatible.


Example Script

you can find this example script in the tests/ folder.

Notes

this library does not use ssl verification for curl by default. Please set the secure flag in the static variable DiscordWebhook::$SECURE_CURL_CONNECTION to true in order to use SSL verification for CURL.

External Ressources

1 - composer documentation 2 - Discord Webhook Documentation 3 - Discord Embeded Message Documentation 4 - Stack Exchange Discord Webhook Original Post


All versions of discordwebhook with dependencies

PHP Build Version
Package Version
No informations.
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 louisgjbertrand/discordwebhook contains the following files

Loading the files please wait ....