Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when adding color #11

Closed
jappi00 opened this issue Apr 9, 2018 · 6 comments
Closed

Error when adding color #11

jappi00 opened this issue Apr 9, 2018 · 6 comments

Comments

@jappi00
Copy link

jappi00 commented Apr 9, 2018

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();`

@nopjmp
Copy link
Owner

nopjmp commented Apr 9, 2018 via email

@jappi00
Copy link
Author

jappi00 commented Apr 10, 2018

Jeah thanks,
The Webhook is only dir an Test Channel and should be invalid. Great Class you have wrote:D

@nopjmp
Copy link
Owner

nopjmp commented Apr 10, 2018 via email

@jappi00
Copy link
Author

jappi00 commented Apr 10, 2018

jeah that's it! Thank you!

@tfevens
Copy link
Contributor

tfevens commented Apr 26, 2018

Fixed in #12

@nopjmp
Copy link
Owner

nopjmp commented Apr 26, 2018

Closing since it was fixed #12

@nopjmp nopjmp closed this as completed Apr 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants