discord-notify

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Discord Notify Skill

Discord Notify 技能

Send messages to Discord channels using incoming webhooks.
使用传入webhook向Discord频道发送消息。

Setup

设置步骤

  1. In Discord, go to Channel Settings → Integrations → Webhooks
  2. Create a new webhook and copy the URL
  3. Set as GitHub secret:
    AGENT_LLM_DISCORD_WEBHOOK_URL
  1. 在Discord中,进入频道设置 → 集成 → Webhooks
  2. 创建一个新的webhook并复制其URL
  3. 将其设置为GitHub密钥:
    AGENT_LLM_DISCORD_WEBHOOK_URL

Usage

使用方法

javascript
const { sendDiscordMessage } = require('./index.js');

// Simple message
await sendDiscordMessage('Hello from PopeBot!');

// Rich embed
await sendDiscordMessage('', {
  embeds: [{
    title: 'Job Complete',
    description: 'The task finished successfully',
    color: 0x00ff00,
    fields: [
      { name: 'Duration', value: '5 minutes', inline: true },
      { name: 'Status', value: 'Success', inline: true }
    ],
    timestamp: new Date().toISOString()
  }]
});

// With mentions
await sendDiscordMessage('Task done <@123456789>!');
javascript
const { sendDiscordMessage } = require('./index.js');

// 简单消息
await sendDiscordMessage('Hello from PopeBot!');

// 富嵌入消息
await sendDiscordMessage('', {
  embeds: [{
    title: 'Job Complete',
    description: 'The task finished successfully',
    color: 0x00ff00,
    fields: [
      { name: 'Duration', value: '5 minutes', inline: true },
      { name: 'Status', value: 'Success', inline: true }
    ],
    timestamp: new Date().toISOString()
  }]
});

// 提及用户/角色
await sendDiscordMessage('Task done <@123456789>!');

Features

功能特性

  • Plain text messages
  • Rich embeds with fields
  • User mentions (
    <@USER_ID>
    )
  • Role mentions (
    <@&ROLE_ID>
    )
  • Timestamps
  • Color-coded embeds
  • Thumbnail and images
  • 纯文本消息
  • 带字段的富嵌入消息
  • 用户提及(
    <@USER_ID>
  • 角色提及(
    <@&ROLE_ID>
  • 时间戳
  • 颜色编码嵌入消息
  • 缩略图和图片

Rate Limits

速率限制

Discord webhooks are rate limited to ~30 requests per minute. The skill includes automatic retry logic.
Discord webhooks的速率限制约为每分钟30次请求。该技能包含自动重试逻辑。