Skip to content
This repository has been archived by the owner on Nov 3, 2018. It is now read-only.

DJManager

Guichaguri edited this page Dec 23, 2015 · 2 revisions

The DJManager is a class that let you create DJs. You can have multiple DJs in a single DJManager if the voice channels are in different servers

Functions

new DJManager(data)

The constructor of the DJManager class

  • data A Discordie bot instance or an object with
    • email The email of the Discord account
    • password The password of the Discord account
    • token The token of the Discord account. If set, email and password are not required

Planned: Accept discord.js and discord.io bot instances

create(voiceChannel, type)

Creates a new DJ. Returns a Promise with the DJ instance or an error

  • voiceChannel The ID or name of the voice channel
  • type Can be set for any other class that extends DJ. Optional

Planned: Accept Discordie, discord.js and discord.io voice channel instances

setYoutubeKey(key)

Sets a global Youtube API key, it will be used for every bot created by this manager. This is only required if you want to use Youtube Playlists

  • key The public key

Note that you have to set it before creating the DJs

setSoundcloudKey(key)

Sets a global Soundcloud API key, it will be used for every bot created by this manager. This is only required if you want to use Soundcloud Playlists or play Soundcloud tracks

  • key The public key

Note that you have to set it before creating the DJs

Clone this wiki locally