Git Product home page Git Product logo

discord-webhooks's People

Contributors

bennetgallein avatar nopjmp avatar richard4339 avatar tfevens avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

discord-webhooks's Issues

How to use timestamp?

I am doing $embed->timestamp();

What am I doing wrong? I can't seem to find how to print out the current timestamp.

Composer installation

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?

Mark Users

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');

Jump lines

$webhook->username('Bot')->message('Hello, Human!')->send();

I tried < b r > and \n without success.

How can we jump lines?

Thanks.

Error when adding color

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

Webhooks

Will this library also support on creating webhooks?

README.md Update

Since the last push on this repo, you need to update your README.md, it is using name instead of username.

cURL error

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.

Add line break to message

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.

Add error checking to various parts

To prevent human errors and throwing back sometimes obscure cURL error messages, we should check the parameters to make sure they are valid.

  • URL check with filter api
  • Message length checks
  • Embed validation
  • Find more places for validation

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.