360 Secure SkillHub
360 安全技能中心

SocialKit Discord Post

用于在 Discord 频道发布公告或更新:先创建帖子文件夹并写入 post.json,校验后展示内容,等用户在终端手动批准,再通过 webhook 发布文本或媒体消息。依赖 socialkit-social-core 的初始化与批准脚本。

分类:营销
ahmadhussain0335
ahmadhussain0335
热度 37.37
最近更新 2026-11-06 14:54:02

安装

发给 Agent
帮我安装这个技能:npx secure-skills-cli add ahmadhussain0335/socialkit-discord-post
兼容性
通用兼容
联网要求
需要联网
数据出网
必须出网
Metadata
name
socialkit-discord-post
description
Posts a message with optional attachments to a Discord channel through a channel webhook after the user approves it. Use when the user wants to post an announcement or update to their Discord server.
license
MIT
metadata
{"author":"Ahmad Hussain","platform":"discord","requires":"socialkit-social-core"}

Discord post

Apply socialkit-social-core. Official API only. Setup: setup.

Rules

  • Mentions never ping unless options.allowMentions is true; only set it when the user asks.
  • The webhook URL is a secret; refer to it only by its environment variable name.

Steps

  1. Check the credentials in setup are set (environment variables only).
  2. Create the post folder with the socialkit-social-core post script: node <socialkit-social-core>/scripts/post.mjs --init --dir dc-<slug> --platform discord --kind <text|media>
  3. Write post.json (text, media with alt text, options). See node scripts/publish.mjs --help.
  4. Validate: node scripts/publish.mjs --check --dir dc-<slug>
  5. Stop. Show the post. Ask the user to approve in their own terminal: node <socialkit-social-core>/scripts/post.mjs --approve --dir dc-<slug>
  6. Publish: node scripts/publish.mjs --publish --dir dc-<slug> and report the result.

Failure handling

  • DISCORD_404: the webhook was deleted; create a new one. Do not retry the old URL.
  • APPROVAL_REQUIRED: the post changed after approval; ask again.
  • ALREADY_PUBLISHED: this folder was posted; use --allow-repost only if the user asks.