GithubHelp home page GithubHelp logo

fultuk / discord-webhook Goto Github PK

View Code? Open in Web Editor NEW

This project forked from labymod/discord-webhook

0.0 0.0 0.0 197 KB

A lightweight library for Discord™ Webhooks

Home Page: https://packagist.org/packages/labymod/discord-webhook

License: GNU General Public License v3.0

PHP 99.46% Shell 0.54%

discord-webhook's Introduction

Discord Webhook

Latest Stable Version Latest Unstable Version Total Downloads Scrutinizer Code Quality License

Send Discord messages directly from your PHP application. Even with embeds & files!

Versions & Compatibility

Release Supported PHP Versions Supported Symfony Versions Release Date Maintained Branch
3.x ^8.1 ^4.4.35, ^5.3.12, ^6.0 23.01.2022 Yes master
2.x ^8.0 ^4.4.35, ^5.3.12, ^6.0 23.01.2022 Yes 2.x
1.x ^7.3, ^8.0 ^3.0, ^4.0, ^5.0 05.01.2020 No 1.x

Installation

Composer installation

composer require labymod/discord-webhook

Documentation

Hop into the wonderful world of webhooks with just those few lines:

use DiscordWebhook\Webhook;

$wh = new Webhook('https://my.webhook/url');
$wh
    ->setMessage('Hello world!')
    ->send();

✨ NEW: Simple Webhooks

First (recommended but optional): Define the DWH_DEFAULT_URL as environment variable

use DiscordWebhook\SimpleWebhook;

// with environment variable defined:
SimpleWebhook::sendMessage('My simple message.');

// without environment variable defined (or to override the already set env var):
SimpleWebhook::sendMessage('My simple message.', 'https://discord.com/my/webhook/url');

For further documentation have a look here:

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.