承接 nozell/webhookapi 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

nozell/webhookapi

Composer 安装命令:

composer require nozell/webhookapi

包简介

A PocketMine-MP Virion to easily send messages via Discord Webhooks

README 文档

README

#DiscordWebhookAPI

🎉 Join the BlockForDevs Discord Community! 🎉

👉 Click Here to Join Now! 👈

DiscordWebhookAPI  

A PocketMine-MP Virion to easily send messages via Discord Webhooks

Una Virion para PocketMine-MP para enviar mensajes fácilmente mediante Discord Webhooks

🎉 Installation / Instalación

Installation is easy. You may get a compiled .phar here or integrate the virion itself into your plugin.
La instalación es fácil. Puedes obtener un .phar compilado aquí o integrar directamente el virion en tu plugin.

This virion is purely object-oriented. To use it, you'll need to import the Webhook, Message, and optionally, the Embed object (if needed).
Esta API es completamente orientada a objetos. Para usarla, deberás importar los objetos Webhook, Message, y opcionalmente, Embed si es necesario.

🛠 Basic Usage / Uso básico

Import the classes / Importar las clases

To use this API in your code, you'll need to import the following classes:
Para usar esta API en tu código, necesitarás importar las siguientes clases:

<?php
use CortexPE\DiscordWebhookAPI\Message;
use CortexPE\DiscordWebhookAPI\Webhook;
use CortexPE\DiscordWebhookAPI\Embed; // optional / opcional

Construct a Webhook object / Crear un objeto Webhook

You'll need the Webhook URL. For more information on how to create Discord webhooks, click here.
Necesitarás la URL del Webhook. Para más información sobre cómo crear webhooks en Discord, haz clic aquí.

$webHook = new Webhook("YOUR WEBHOOK URL");

Construct a Message object / Crear un objeto Message

You must create a new Message object for each message you want to send.
Deberás crear un nuevo objeto Message para cada mensaje que desees enviar.

$msg = new Message();
$msg->setUsername("USERNAME"); // optional / opcional
$msg->setAvatarURL("https://cortexpe.xyz/utils/kitsu.png"); // optional / opcional
$msg->setContent("INSERT TEXT HERE"); // optional. Max length 2000 characters / opcional. Máximo 2000 caracteres

Send the message / Enviar el mensaje

Now you can send the message using the send() method. This will schedule an AsyncTask to avoid blocking the main thread.
Ahora puedes enviar el mensaje usando el método send(). Esto programará una AsyncTask para evitar bloquear el hilo principal.

$webHook->send($msg);

📦 Embeds

Before sending a message, you may want to add an embed. You can construct an Embed object and use Message->addEmbed() to include it.
Antes de enviar un mensaje, quizá quieras agregar un embed. Puedes construir un objeto Embed y usar Message->addEmbed() para incluirlo.

$embed = new Embed();
$embed->setTitle("Embed Title Here");
$embed->setDescription("A very awesome description / Una descripción muy genial");

You can also add a footer:
También puedes añadir un pie de página:

$embed->setFooter("Footer text / Texto del pie de página");

Finally, add the embed to the message:
Finalmente, agrega el embed al mensaje:

$msg->addEmbed($embed);

Example Code / Código de ejemplo:

$webHook = new Webhook("YOUR WEBHOOK URL");
$msg = new Message();
$msg->setUsername("USERNAME");
$msg->setAvatarURL("https://cortexpe.xyz/utils/kitsu.png");
$msg->setContent("INSERT TEXT HERE");

$embed = new Embed();
$embed->setTitle("EMBED 1");
$embed->setColor(0xFF0000);
$msg->addEmbed($embed);

$embed = new Embed();
$embed->setTitle("EMBED 2");
$embed->setColor(0x00FF00);
$embed->setAuthor("AUTHOR", "https://CortexPE.xyz", "https://cortexpe.xyz/utils/kitsu.png");
$embed->setDescription("Lorem ipsum dolor sit amet.");
$msg->addEmbed($embed);

$webHook->send($msg);

This API was made with ❤️ by CortexPE updated by Nozell. Enjoy!~ :3
Esta API fue hecha con ❤️ por CortexPE actualizado por Nozell. ¡Disfrútala!~ :3

nozell/webhookapi 适用场景与选型建议

nozell/webhookapi 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 6 次下载、GitHub Stars 达 2, 最近一次更新时间为 2024 年 10 月 11 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 nozell/webhookapi 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 nozell/webhookapi 我们能提供哪些服务?
定制开发 / 二次开发

基于 nozell/webhookapi 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2024-10-11