Git Product home page Git Product logo

Comments (10)

nopjmp avatar nopjmp commented on May 27, 2024 1

from discord-webhooks.

nopjmp avatar nopjmp commented on May 27, 2024

from discord-webhooks.

nopjmp avatar nopjmp commented on May 27, 2024

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.

wblaircox avatar wblaircox commented on May 27, 2024

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.

nopjmp avatar nopjmp commented on May 27, 2024

from discord-webhooks.

wblaircox avatar wblaircox commented on May 27, 2024

I modified it, it's fake. Thanks, most appreciated.

from discord-webhooks.

nopjmp avatar nopjmp commented on May 27, 2024
$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.

wblaircox avatar wblaircox commented on May 27, 2024

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.

wblaircox avatar wblaircox commented on May 27, 2024

Suspect that issue is on my end...

from discord-webhooks.

wblaircox avatar wblaircox commented on May 27, 2024

Cheers, thanks for pointing out my blunder!

from discord-webhooks.

Related Issues (12)

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.