Discord logo

Discord

Community
alanalvestech
discord

Manage Discord servers, channels, messages and members via Bot API

Overview

Publisheralanalvestech
Repositoryhitank
Skill namediscord
Stars
38
Forks
4
Bundled files
14
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 14 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by alanalvestech on GitHub. Read the source before you install it.

Installation

Install the Discord AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/alanalvestech/hitank/tree/main/skills/discord
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/alanalvestech/hitank.git /tmp/hitank
mkdir -p .claude/skills
cp -r /tmp/hitank/skills/discord .claude/skills/discord
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Discord in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Discord on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Discord is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

/discord

Connect to Discord to manage servers, send messages, read channels, react, pin, create threads and more. Pure Ruby, zero gems — stdlib only.

Structure

scripts/
├── auth.rb            # Bot token auth + discord_request helper (required by all scripts)
├── check_setup.rb     # Check if token exists (outputs OK or SETUP_NEEDED)
├── save_token.rb      # Save and validate a bot token
├── guilds.rb          # List servers the bot is in
├── channels.rb        # List channels in a server
├── messages.rb        # Read messages from a channel
├── send_message.rb    # Send a message to a channel
├── edit_message.rb    # Edit a message
├── delete_message.rb  # Delete a message
├── react.rb           # Add a reaction to a message
├── pin.rb             # Pin a message
├── members.rb         # List members in a server
├── roles.rb           # List roles in a server
└── thread_create.rb   # Create a thread from a message

Setup (check before using)

bash
ruby ~/.claude/skills/discord/scripts/check_setup.rb

If the output is OK, proceed to the Flow section.

If the output is SETUP_NEEDED, guide the user step by step. Present ONE step at a time, wait for the user to confirm before moving to the next.

Step 1 — Ask the user to create a Discord bot and get the token:

You need a Discord Bot token. Go to the Discord Developer Portal: https://discord.com/developers/applications

  1. Click New Application, give it a name
  2. Go to Bot in the left menu
  3. Click Reset Token and copy the token
  4. Under Privileged Gateway Intents, enable Server Members Intent and Message Content Intent
  5. Go to OAuth2 > URL Generator, select scope bot, then select permissions: Read Messages/View Channels, Send Messages, Manage Messages, Read Message History, Add Reactions
  6. Copy the generated URL and open it to invite the bot to your server

Paste the bot token here.

Step 2 — When the user pastes the token, save it:

bash
ruby ~/.claude/skills/discord/scripts/save_token.rb 'PASTED_TOKEN'

If the script outputs an error, the token is invalid. Ask the user to double-check and try again.

If setup is not complete, DO NOT proceed to the Flow. Complete all steps first.

Flow

The argument $ARGUMENTS may contain a server name or channel reference.

Step 1: List servers

bash
ruby ~/.claude/skills/discord/scripts/guilds.rb

Present the servers. If there is only one, use it automatically. Otherwise ask which server to work with.

Step 2: List channels

bash
ruby ~/.claude/skills/discord/scripts/channels.rb GUILD_ID
ruby ~/.claude/skills/discord/scripts/channels.rb GUILD_ID --type 0

Show text channels (type 0) by default. Ask which channel to work with.

Step 3: Actions

Read messages:

bash
ruby ~/.claude/skills/discord/scripts/messages.rb CHANNEL_ID
ruby ~/.claude/skills/discord/scripts/messages.rb CHANNEL_ID --limit 50

Send a message (requires user confirmation):

Show the message content first, then ask to confirm before sending.

bash
ruby ~/.claude/skills/discord/scripts/send_message.rb CHANNEL_ID "Hello from HiTank!"

Edit a message (requires user confirmation):

bash
ruby ~/.claude/skills/discord/scripts/edit_message.rb CHANNEL_ID MESSAGE_ID "Updated content"

Delete a message (requires user confirmation):

Show the message first, then ask: "Do you want to delete this message?" Only execute after a "yes".

bash
ruby ~/.claude/skills/discord/scripts/delete_message.rb CHANNEL_ID MESSAGE_ID

React to a message (requires user confirmation):

bash
ruby ~/.claude/skills/discord/scripts/react.rb CHANNEL_ID MESSAGE_ID "✅"

Pin a message (requires user confirmation):

bash
ruby ~/.claude/skills/discord/scripts/pin.rb CHANNEL_ID MESSAGE_ID

Create a thread (requires user confirmation):

bash
ruby ~/.claude/skills/discord/scripts/thread_create.rb CHANNEL_ID MESSAGE_ID "Thread Name"

List members:

bash
ruby ~/.claude/skills/discord/scripts/members.rb GUILD_ID
ruby ~/.claude/skills/discord/scripts/members.rb GUILD_ID --limit 100

List roles:

bash
ruby ~/.claude/skills/discord/scripts/roles.rb GUILD_ID

Notes

  • Pure Ruby, zero gems — stdlib only (json, net/http, uri, fileutils)
  • Auth via Bot token (Authorization: Bot TOKEN)
  • Token file: ~/.config/discord/token (outside the repo, never commit)
  • Sending, editing, deleting messages, reacting, pinning, and creating threads require explicit user confirmation
  • Mention users as <@USER_ID> in message content
  • Avoid Markdown tables in outbound Discord messages
  • Rate limit: Discord uses per-route rate limits — check X-RateLimit-* headers
  • Base URL: https://discord.com/api/v10

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Discord AI skill do?

Manage Discord servers, channels, messages and members via Bot API

Why use Discord on TypingMind?

Because you install it once and use it with any model. Discord is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Discord in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/alanalvestech/hitank/tree/main/skills/discord. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Discord?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Discord?

As many as you like. As long as a model supports skills, you can use Discord with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Discord AI skill free?

Yes. It is published on GitHub by alanalvestech under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇