Comments (10)
from discord-webhooks.
from discord-webhooks.
Also I'd need to see how you are using the class because the constructor wants a url. I didn't put any extensive error checking in yet since I didn't need it.
from discord-webhooks.
Fresh install of WAMP. Switched PHP to 7.0.29, 7.1.16 and 7.2.4. Using your latest commit of discord-webhooks. Same error.
Example of the URL I'm getting from Discord;
https: //discordapp.com/api/webhooks/44223324552327136384/B_5n596Xjog-djmsopeXITEmfXeV8O7fjhskeoyNyCbgBdaa71YZsns8khpeLdmcvkG3PnIX
I began with your example so I could test and build off it.
<?php
require_once 'DiscordWebhooks\Client.php';
require_once 'DiscordWebhooks\Embed.php';
require_once "Careerjet_API.php";
use \DiscordWebhooks\Client;
use \DiscordWebhooks\Embed;
$webhook = new Client('https: //discordapp.com/api/webhooks/44223324552327136384/B_5n596Xjog-djmsopeXITEmfXeV8O7fjhskeoyNyCbgBdaa71YZsns8khpeLdmcvkG3PnIX
');
$embed = new Embed();
$embed->description('This is an embed');
$webhook->username('Bot')->message('Hello, Human!')->embed($embed)->send();
...
from discord-webhooks.
from discord-webhooks.
I modified it, it's fake. Thanks, most appreciated.
from discord-webhooks.
$webhook = new Client('https: //discordapp.com/api/webhooks/44223324552327136384/B_5n596Xjog-djmsopeXITEmfXeV8O7fjhskeoyNyCbgBdaa71YZsns8khpeLdmcvkG3PnIX
');
Can you check to make sure you don't have a space after the colon and before the double forward slashes? That would be an invalid URL.
from discord-webhooks.
ah, well that certainly was one issue. Now I get the following (using the real webhook URL);
Fatal error: Uncaught Exception: cURL error (60): Peer certificate cannot be authenticated with given CA certificates in C:\wamp\www\bot\DiscordWebhooks\Client.php on line 73
Exception: cURL error (60): Peer certificate cannot be authenticated with given CA certificates in C:\wamp\www\bot\DiscordWebhooks\Client.php on line 73
--
from discord-webhooks.
Suspect that issue is on my end...
from discord-webhooks.
Cheers, thanks for pointing out my blunder!
from discord-webhooks.
Related Issues (12)
- Implement Support for the rest of the Discord Webhook API HOT 1
- Jump lines HOT 4
- Error when adding color HOT 6
- Add error checking to various parts HOT 2
- Add line break to message HOT 3
- How to use timestamp? HOT 6
- Mark Users HOT 4
- //wrong
- README.md Update HOT 10
- Composer installation HOT 3
- Webhooks HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from discord-webhooks.