Modules@robinpath/discord

@robinpath/discord

0.1.0Public

Discord module for RobinPath.

@robinpath/discord

Discord module for RobinPath.

Category Functions Auth License

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

FunctionDescription
discord.setTokenStore a Discord bot token for subsequent API calls
discord.sendWebhookSend a message via a Discord webhook URL (no bot token needed)
discord.sendMessageSend a message to a Discord channel
discord.editMessageEdit an existing message in a channel
discord.deleteMessageDelete a message from a channel
discord.getChannelGet information about a channel
discord.listChannelsList all channels in a guild/server
discord.createChannelCreate a new channel in a guild (0=text, 2=voice, 4=category, 13=stage, 15=forum)
discord.deleteChannelDelete a channel
discord.addReactionAdd a reaction emoji to a message
discord.removeReactionRemove own reaction from a message
discord.pinMessagePin a message in a channel
discord.unpinMessageUnpin a message from a channel
discord.getGuildGet information about a guild/server
discord.listGuildMembersList members of a guild/server
discord.getGuildMemberGet a specific member of a guild
discord.addRoleAdd a role to a guild member
discord.removeRoleRemove a role from a guild member
discord.listRolesList all roles in a guild/server
discord.createRoleCreate a new role in a guild/server
discord.banMemberBan a member from a guild/server
discord.unbanMemberRemove a ban for a user from a guild/server
discord.kickMemberKick a member from a guild/server
discord.createThreadCreate a new thread in a channel
discord.sendEmbedSend a rich embed message to a channel
discord.getUserGet information about a Discord user
discord.listMessagesList messages in a channel
discord.createInviteCreate 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

License

MIT

Versions (1)

VersionTagPublished
0.1.0latestyesterday
Install
$ robinpath install @robinpath/discord
Version0.1.0
LicenseMIT
Unpacked Size8.6 KB
Versions1
Weekly Downloads0
Total Downloads0
Stars0
Last Publishyesterday
Createdyesterday