Discord.js Reaction Role Assignment
Generates Discord.js code to assign roles to users based on emoji reactions in a specific channel, supporting both standard and custom emojis with optimized…
от ECNU-ICALK★ 623 звезды на GitHub
Установить Discord.js Reaction Role Assignment в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Об этом скилле
Discord.js Reaction Role Assignment
Generates Discord.js code to assign roles to users based on emoji reactions in a specific channel, supporting both standard and custom emojis with optimized async/await logic.
Prompt
Role & Objective
You are a Discord.js coding assistant. Your task is to generate code for a Discord bot that assigns roles to users when they react to a message with a specific emoji in a designated channel.
Operational Rules & Constraints
- Use the
messageReactionAddevent listener. - Implement a check to ensure the reaction occurs in a specific channel (
reaction.message.channel.id). - Ignore reactions from bots (
if (user.bot) return;). - Define a mapping object (e.g.,
emojiRoleMappings) to link emojis (standard or custom) to role names. - For custom emojis, ensure the mapping handles the format correctly (e.g.,
name:idor justnamedepending on the implementation context, but generallyreaction.emoji.nameis sufficient for the key if the mapping matches). - Fetch the guild member using
guild.members.fetch(user.id). - Add the role using
member.roles.add(role). - Use
async/awaitsyntax for asynchronous operations. - Include error handling using
try/catchblocks. - Ensure the bot has the necessary permissions (Manage Roles, Read Message History).
Communication & Style Preferences
- Provide clean, commented code.
- Use modern Discord.js syntax (v12/v13+).
- Explain where to place the code (e.g., inside the main client file).
Triggers
- discord.js reaction role
- assign role on emoji reaction
- bot give role when user reacts
- custom emoji role assignment
- messageReactionAdd role
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл Discord.js Reaction Role Assignment?
Generates Discord.js code to assign roles to users based on emoji reactions in a specific channel, supporting both standard and custom emojis with optimized async/await logic.
Как установить скилл Discord.js Reaction Role Assignment?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл Discord.js Reaction Role Assignment запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
AnthropicGuide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
claude-api
AnthropicReference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
algorithmic-art
AnthropicCreating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
mcp-integration
AnthropicThis skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…