Discord Player
Library compatibility

Using Oceanic instead of Discord.js

Learn how to use Oceanic instead of Discord.js with Discord Player

This feature is currently available in dev release only.

To use oceanic, you just need to wrap your Oceanic client with createOceanicCompat function from discord-player. This function will return a new client proxy which mimics the Discord.js client.

index.js
const { Player, createOceanicCompat } = require('discord-player');
const { Client } = require('oceanic.js');
 
const client = new Client({
  auth: 'Bot ...',
  gateway: {
    intents: ['GUILD_VOICE_STATES' /* Other intents */],
  },
});
 
const player = new Player(createOceanicCompat(client));

Because this is a proxy, the original client will not be mutated.