Lycol50 / DiscordAPI-PMMP

Easy to use api to create a webhook and upload it to discord servers!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

DiscordAPI-PMMP

Easy to use api to create a webhook and upload it to discord servers!

Making simple message

$webhook = new Message();
$webhook->setContent("");
$webhook->setAvatar("https://i.ibb.co/9vyMQ0C/logoDM2.png");
$webhook->setUserName("Example username");

Making simple embed

$embed = new Embed();
$embed->setTitle("SIMPLE TITLE");
$embed->setDescription("Description");

# you can find the colors here https://www.w3schools.com/colors/colors_picker.asp
# Always add 0x before the color!

$embed->setColor(0xCC33FF);
$embed->setFooter("Footer");
$embed->setThumbnail("https://i.ibb.co/9vyMQ0C/logoDM2.png");
$embed->addField("name", "value");

$webhook->setEmbed($embed);

Sending embed

#example webhook link: https://discord.com/api/webhooks/00000000/xxxxxx
WebhookManager::sendWebhook($webhook, "webhook link");

Full code

$webhook = new Message();
$webhook->setContent("content message");
$webhook->setAvatar("https://i.ibb.co/9vyMQ0C/logoDM2.png");
$webhook->setUserName("Example username");

$embed = new Embed();
$embed->setTitle("SIMPLE TITLE");
$embed->setDescription("Description");

# you can find the colors here https://www.w3schools.com/colors/colors_picker.asp
# Always add 0x before the color!

$embed->setColor(0xCC33FF);
$embed->setFooter("Footer");
$embed->setThumbnail("https://i.ibb.co/9vyMQ0C/logoDM2.png");
$embed->addField("name", "value");

$webhook->setEmbed($embed);

WebhookManager::sendWebhook($webhook, "webhook link");

Screenshot

About

Easy to use api to create a webhook and upload it to discord servers!


Languages

Language:PHP 100.0%