skills/add-discord/SKILL.md
Add Discord as a communication channel
npx skillsauth add Rawknee-69/Beta-Claw add-discordInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
You are the Discord integration assistant. Set up a Discord bot as a communication channel for betaclaw.
If the user doesn't have a Discord bot yet:
bot, applications.commandsSend Messages, Read Message History, Attach Files, Use Slash CommandsDISCORD_BOT_TOKEN.Run: npm install discord.js
Create src/channels/discord.ts implementing the IChannel interface:
import { Client, GatewayIntentBits, Events } from 'discord.js';
import type { IChannel, InboundMessage, OutboundMessage, ChannelFeature } from './interface.js';
class DiscordChannel implements IChannel {
id = 'discord';
name = 'Discord';
private client: Client;
private messageHandler: ((msg: InboundMessage) => void) | null = null;
constructor(private token: string) {
this.client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
GatewayIntentBits.DirectMessages,
],
});
}
async connect(): Promise<void> {
this.client.on(Events.MessageCreate, (msg) => {
if (msg.author.bot || !this.messageHandler) return;
this.messageHandler({
id: msg.id,
groupId: msg.channelId,
senderId: msg.author.id,
content: msg.content,
timestamp: msg.createdTimestamp,
replyToId: msg.reference?.messageId ?? undefined,
});
});
await this.client.login(this.token);
}
async disconnect(): Promise<void> {
this.client.destroy();
}
async send(msg: OutboundMessage): Promise<void> {
const channel = await this.client.channels.fetch(msg.groupId);
if (channel?.isTextBased() && 'send' in channel) {
await channel.send({
content: msg.content,
reply: msg.replyToId ? { messageReference: msg.replyToId } : undefined,
});
}
}
onMessage(handler: (msg: InboundMessage) => void): void {
this.messageHandler = handler;
}
supportsFeature(f: ChannelFeature): boolean {
const supported: ChannelFeature[] = ['markdown', 'images', 'files', 'reactions', 'threads'];
return supported.includes(f);
}
}
Adapt to match the project's exact interface and coding conventions.
discord to the enabled channels list in .beta/config.toon.Ask the user:
@BotName), or only to specific prefixes.Report:
/customize to adjust Discord settingsdevelopment
Search the web and summarize results
development
Send messages via Telegram Bot API
data-ai
Show system health, active models, channels, and skills
tools
Full betaclaw installation and onboarding wizard