@rythra/connector-discordjs
v0.2.0
Published
Official **Discord.js** connector for [Rythra](https://github.com/Ekretos/Rythra). Bridges Discord.js gateway events and voice state with Rythra's framework-agnostic audio runtime.
Readme
@rythra/connector-discordjs 🔌
Official Discord.js connector for Rythra. Bridges Discord.js gateway events and voice state with Rythra's framework-agnostic audio runtime.
📦 Installation
# Using Bun
bun add @rythra/core @rythra/connector-discordjs discord.js
# Using npm
npm install @rythra/core @rythra/connector-discordjs discord.js🚀 Usage
import { Client, GatewayIntentBits } from 'discord.js';
import { Rythra } from '@rythra/core';
import { DiscordJS } from '@rythra/connector-discordjs';
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildVoiceStates,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
],
});
const connector = new DiscordJS(client);
const rythra = new Rythra({
connector,
nodes: [
{
host: 'localhost',
port: 2333,
password: 'youshallnotpass',
secure: false,
},
],
});
client.once('clientReady', async () => {
console.log(`Ready as ${client.user?.tag}!`);
await rythra.connect();
});
client.login('YOUR_DISCORD_BOT_TOKEN');📄 License
MIT © Rythra Team
