nopjmp / discord-webhooks Goto Github PK
View Code? Open in Web Editor NEWA simple lightweight Discord webhook client library.
License: MIT License
A simple lightweight Discord webhook client library.
License: MIT License
//wrong
$webhook->username('Bot')->message('Hello, Human!')->send();
I tried < b r > and \n without success.
How can we jump lines?
Thanks.
Will this library also support on creating webhooks?
Hello, I would like you to think about the following scenario. I want the webhook to refer someone from the group, how can I do that?
input ('user', '@ usernema#123');
I am doing $embed->timestamp();
What am I doing wrong? I can't seem to find how to print out the current timestamp.
I'm getting this error when running 'composer install' or 'composer require nopjmp/discord-webhooks'
Root package 'nopjmp/discord-webhooks' cannot require itself in its composer.json
Did you accidentally name your root package after an external package?
I would like to implement the rest of the API in a simple way. Possibly in another class to avoid loading unnecessary classes.
https://discordapp.com/developers/docs/resources/webhook#execute-webhook
Great job on this!
Is it possible to add a line break to a message? I’ve tried adding \n
but it’s also being included in the output on Discord.
Thanks.
Hi, I'm having the following error;
Fatal error: Uncaught exception 'Exception' with message ' in C:\wamp\www\bot\DiscordWebhooks\Client.php on line 73
Exception: cURL error (3): URL using bad/illegal format or missing URL in C:\wamp\www\bot\DiscordWebhooks\Client.php on line 73
I've done some troubleshooting on my end to see if perhaps WAMP is blocking cURL, but all looks as it should. Any suggestions? Thanks.
Since the last push on this repo, you need to update your README.md, it is using name
instead of username
.
Hey, I become an Error when I adding a Color to e embed
Fatal error: Uncaught Exception: 400:{"embeds": ["0"]} in D:\XAMPP\htdocs\discordbot\DiscordWebhooks\Client.php:80 Stack trace: #0 D:\XAMPP\htdocs\discordbot\index.php(18): DiscordWebhooks\Client->send() #1 {main} thrown in D:\XAMPP\htdocs\discordbot\DiscordWebhooks\Client.php on line 80
My Code looks like:
`require_once 'DiscordWebhooks\Client.php';
require_once 'DiscordWebhooks\Embed.php';
use \DiscordWebhooks\Client;
use \DiscordWebhooks\Embed;
$webhook = new Client('https://discordapp.com/api/webhooks/blabla');
$embed = new Embed();
$embed->description('LUL');
$embed->field('Test1', 'Hallo1', true);
$embed->color('#e26367');
$embed->field('Test2', 'Hallo2', true);
$embed->field('Test3', 'Hallo3', false);
$embed->field('Test4', 'Hallo4', true);
$webhook->username('KevinBot')->message('Hello, Human!')->embed($embed)->send();`
To prevent human errors and throwing back sometimes obscure cURL error messages, we should check the parameters to make sure they are valid.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.