Giphy GIF Search
Find a relevant GIF from Giphy and send it naturally in Discord.
Behavior Rules
- - Send GIFs when explicitly requested.
- Also allow proactive GIFs (without explicit request) when the moment clearly fits: celebration, shared humor, or strong emotional beats.
- Keep proactive usage occasional (at most one GIF for a moment, avoid back-to-back GIF-only replies).
- Prefer text-only in serious or information-dense conversation.
- Keep results safe-for-work (
rating=g).
API Key (Easy Setup)
This skill reads only one variable: GIPHY_API_KEY.
Option A: Temporary (current shell session)
CODEBLOCK0
Option B: Persistent for OpenClaw (recommended)
Add to ~/.openclaw/.env:
CODEBLOCK1
Then restart OpenClaw so the environment is reloaded.
Validation
- - If
GIPHY_API_KEY is present, the skill works. - If missing, ask the user to set it and retry.
Workflow
- 1. Build a Giphy Search API URL with user intent as query.
- URL-encode the query text.
- Request one result from Giphy.
- Extract the first GIF page URL from
data[0].url. - Send that URL to Discord.
API Request Template
Use this endpoint shape:
INLINECODE5
Output Rule
- - If a GIF URL is found: send only the URL (Discord auto-embeds).
- If no result is found: send a short fallback text and ask for a better keyword.
Good Query Examples
- - INLINECODE6
- INLINECODE7
- INLINECODE8
- INLINECODE9
Fallback Message
"I couldn’t find a GIF with the vibe you’re looking for. Could you give me a bit more specific keywords?"
Giphy GIF 搜索
从 Giphy 找到相关的 GIF 并自然地发送到 Discord。
行为规则
- - 仅在明确请求时发送 GIF。
- 在时机明显合适时(庆祝、共享幽默或强烈情感时刻),也允许主动发送 GIF(无需明确请求)。
- 保持主动使用频率适中(每个时刻最多一个 GIF,避免连续只回复 GIF)。
- 在严肃或信息密集的对话中优先使用纯文本。
- 确保结果适合工作场合(rating=g)。
API 密钥(简易设置)
此技能仅读取一个变量:GIPHYAPIKEY。
选项 A:临时(当前 Shell 会话)
bash
export GIPHYAPIKEY=your-api-key
选项 B:为 OpenClaw 持久化设置(推荐)
添加到 ~/.openclaw/.env:
bash
GIPHYAPIKEY=your-api-key
然后重启 OpenClaw 以重新加载环境。
验证
- - 如果 GIPHYAPIKEY 存在,技能即可正常工作。
- 如果缺失,请提示用户设置并重试。
工作流程
- 1. 使用用户意图作为查询词,构建 Giphy 搜索 API URL。
- 对查询文本进行 URL 编码。
- 向 Giphy 请求一个结果。
- 从 data[0].url 提取第一个 GIF 页面 URL。
- 将该 URL 发送到 Discord。
API 请求模板
使用以下端点格式:
https://api.giphy.com/v1/gifs/search?apikey=&q=QUERY>&limit=1&rating=g&lang=en
输出规则
- - 如果找到 GIF URL:仅发送该 URL(Discord 会自动嵌入)。
- 如果未找到结果:发送简短的备用文本,并提示用户提供更好的关键词。
优秀查询示例
- - happy dance
- facepalm reaction
- mind blown
- awkward silence
备用消息
我找不到符合您想要氛围的 GIF。您能提供更具体的关键词吗?