noynac/phpcord-webhooks 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

noynac/phpcord-webhooks

Composer 安装命令:

composer require noynac/phpcord-webhooks

包简介

A PHP wrapper for using Discord's webhook API

README 文档

README

Software License

This is a small WIP library for using discord webhooks.

Install

composer require noynac/phpcord-webhooks

Usage

require_once "vendor/autoload.php";

use DiscordWebhook\Message;
use DiscordWebhook\Embed;

$webhook = 'YOUR-WEBHOOK-URL-HERE';

$message = new Message();
$message->setWebhook($webhook)
    ->setMessage("some message")
    ->setUsername("username here");

$newEmbed = new Embed();
$newEmbed->setColor('1000')
	->setTitle('Some title')
	->setURL('https://github.com/Sooshiii/phpcord-webhooks')
	->setAuthor('Some name', 'https://i.imgur.com/EJOjIMC.jpg')
	->setDescription('Some description here')
	->setThumbnail('https://i.imgur.com/EJOjIMC.jpg')
	->addField('Inline field title', 'Some value here', true)
	->setImage('https://i.imgur.com/EJOjIMC.jpg')
	->setTimestamp()
	->setFooter('Some footer text here', 'https://i.imgur.com/EJOjIMC.jpg');
      
$message->addEmbed($newEmbed);

$message->send();

Testing

$ phpunit

Contributing

Please see CONTRIBUTING for details.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 7
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-05-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固