Modules@robinpath/discord
@robinpath/discord
0.1.0PublicDiscord module for RobinPath.
@robinpath/discord
Discord module for RobinPath.
Why use this module?
The discord module lets you:
- Send a message via a Discord webhook URL (no bot token needed)
- Send a message to a Discord channel
- Edit an existing message in a channel
- Delete a message from a channel
- Get information about a channel
All functions are callable directly from RobinPath scripts with a simple, consistent API.
Installation
npm install @robinpath/discord
Quick Start
1. Set up credentials
discord.setToken "your-bot-token"
2. Send a message via a Discord webhook URL (no bot token needed)
discord.sendWebhook "https://discord.com/api/webhooks/..." "Hello!" {"username": "MyBot"}
Available Functions
| Function | Description |
|---|---|
discord.setToken | Store a Discord bot token for subsequent API calls |
discord.sendWebhook | Send a message via a Discord webhook URL (no bot token needed) |
discord.sendMessage | Send a message to a Discord channel |
discord.editMessage | Edit an existing message in a channel |
discord.deleteMessage | Delete a message from a channel |
discord.getChannel | Get information about a channel |
discord.listChannels | List all channels in a guild/server |
discord.createChannel | Create a new channel in a guild (0=text, 2=voice, 4=category, 13=stage, 15=forum) |
discord.deleteChannel | Delete a channel |
discord.addReaction | Add a reaction emoji to a message |
discord.removeReaction | Remove own reaction from a message |
discord.pinMessage | Pin a message in a channel |
discord.unpinMessage | Unpin a message from a channel |
discord.getGuild | Get information about a guild/server |
discord.listGuildMembers | List members of a guild/server |
discord.getGuildMember | Get a specific member of a guild |
discord.addRole | Add a role to a guild member |
discord.removeRole | Remove a role from a guild member |
discord.listRoles | List all roles in a guild/server |
discord.createRole | Create a new role in a guild/server |
discord.banMember | Ban a member from a guild/server |
discord.unbanMember | Remove a ban for a user from a guild/server |
discord.kickMember | Kick a member from a guild/server |
discord.createThread | Create a new thread in a channel |
discord.sendEmbed | Send a rich embed message to a channel |
discord.getUser | Get information about a Discord user |
discord.listMessages | List messages in a channel |
discord.createInvite | Create an invite for a channel |
Examples
Send a message via a Discord webhook URL (no bot token needed)
discord.sendWebhook "https://discord.com/api/webhooks/..." "Hello!" {"username": "MyBot"}
Send a message to a Discord channel
discord.sendMessage "123456789" "Hello from RobinPath!"
Edit an existing message in a channel
discord.editMessage "123456789" "987654321" "Updated text"
Integration with RobinPath
import { RobinPath } from "@wiredwp/robinpath";
import Module from "@robinpath/discord";
const rp = new RobinPath();
rp.registerModule(Module.name, Module.functions);
rp.registerModuleMeta(Module.name, Module.functionMetadata);
const result = await rp.executeScript(`
discord.setToken "your-bot-token"
discord.sendWebhook "https://discord.com/api/webhooks/..." "Hello!" {"username": "MyBot"}
`);
Full API Reference
See MODULE.md for complete documentation including all parameters, return types, error handling, and advanced examples.
Related Modules
@robinpath/slack— Slack module for complementary functionality@robinpath/teams— Teams module for complementary functionality@robinpath/telegram— Telegram module for complementary functionality@robinpath/whatsapp— WhatsApp module for complementary functionality@robinpath/json— JSON module for complementary functionality
License
MIT
Versions (1)
| Version | Tag | Published |
|---|---|---|
| 0.1.0 | latest | yesterday |
Related Modules
communication
0
@robinpath/notification
v0.1.1robinpath
Unified notifications: Slack, Discord, Telegram, and MS Teams via webhooks
0 downloads
...
communication
0
@robinpath/notify
v0.1.1robinpath
Notify module for RobinPath.
0 downloads
...
communication
0
@robinpath/slack
v0.1.0robinpath
Slack Web API and Incoming Webhooks client for messaging, channels, reactions, file uploads, and user management
0 downloads
...
communication
0
@robinpath/sms
v0.1.0robinpath
SMS sending via Twilio and Vonage with validation, formatting, lookup, and cost estimation
0 downloads
...
Install
$ robinpath install @robinpath/discord Version0.1.0
LicenseMIT
Unpacked Size8.6 KB
Versions1
Weekly Downloads0
Total Downloads0
Stars0
Last Publishyesterday
Createdyesterday

