Adapter

Creates an adapter for a voice channel.

Creating an Adapter

It's very easy to create an adapter. You can easily create one by using the Adapter class. The Adapter class requires the channel parameter. The channel parameter is the voice channel where you want to create the adapter for. After using the class it returns an adapter.

Example

const discordaudio = require('discordaudio');
const discord = require('discord.js');

const client = new discord.Client({intents: [discord.GatewayIntentBits.Guilds]});

const channel = client.channels.cache.get('0123456789');

const adapter = new discordaudio.Adapter(channel);

The adapter that has been created works only for the specified channel. You create an adapter for a specific channel and not for a guild with the Adapter class.

Last updated