Skip to content
This repository was archived by the owner on Jul 3, 2021. It is now read-only.

actions

TAT edited this page Apr 21, 2014 · 36 revisions
  • activatePlaylist
  • addSongToPlaylist
  • [connect]([actions] connect)
  • createPlaylist
  • getAdmins
  • getAmbassadors
  • getAudience
  • getDJ
  • getDJs
  • getHost
  • getMedia
  • getPlaylists
  • getRoomScore
  • getSelf
  • getStaff
  • getTimeElapsed
  • getTimeRemaining
  • getUser
  • getUsers
  • getWaitList
  • getWaitListPosition
  • [log]([actions] log)
  • [meh]([actions] meh)
  • playlistMoveSong
  • [sendChat]([actions] sendChat)
  • [setLogObject deprecated]([actions] setLogger)
  • [setLogger]([actions] setLogger)
  • [woot]([actions] woot)

Moderation actions

  • moderateAddDJ
  • [moderateBanUser]([actions] moderateBanUser)
  • moderateDeleteChat
  • moderateForceSkip
  • moderateLockWaitList
  • moderateRemoveDJ
  • moderateSetRole
  • [moderateUnbanUser]([actions] moderateUnbanUser)
  • [moderateUnBanUser deprecated]([actions] moderateUnbanUser)

These will be moved to seperate sites (hopefully) soon.

vote: (updown, [, callback:fn ])

Vote on the actual song with a string.

updown

string (required)

Either 'up' or 'down', calls the appropriate function (woot() or meh()).

callback

callback (optional)

Example

This is not a parameter!

bot.vote('up'); //woot the song
bot.vote('down'); //meh the song

changeRoomInfo: (name, description, [, callback:fn ])

Change actual room information. Only available if you are the host.

name

string (required)

A (new) name for the room.

description

string (required)

The rooms description.

callback

callback (optional)

Example

This is not a parameter!

bot.changeRoomInfo('Hello World', 'This is a new description for my room.');

changeRoomOptions: (boothLocked, waitListEnabled, maxPlays, maxDJs, [, callback:fn ])

If you are in a room and you are host, you can change the room options with this function.

boothLocked

boolean (required)

Toggles the booths state (locked or unlocked).

waitListEnabled

boolean (required)

Is there a waitlist in this room?

maxPlays

integer (required)

Maximum Plays per DJ.

maxDJs

integer (required)

Limit DJs on the booth to this number (usually 5).

callback

callback (optional)

Example

This is not a parameter!

bot.changeRoomOptions(false, false, 1, 5);

joinBooth: ([ callback:fn ])

Joins the DJ booth if there is a free place.

callback

callback (optional)

Example

This is not a parameter!

bot.joinBooth();

leaveBooth: ([ callback:fn ])

Leave the DJ booth.

callback

callback (optional)

Example

This is not a parameter!

bot.leaveBooth();

removeDJ: (userid [, callback:fn ])

Removes a DJ from the DJ booth if possible. The user has to be in the booth and you need the permission to remove DJs from the booth.

callback

callback (optional)

Example

This is not a parameter!

bot.removeDJ('xxxxxxxxxxxxxxxxxxxxxxxx');

moveDJ: (userid, position [, callback:fn ])

Moves a DJ to a new position in the waitlist. Waitlist numbering beings with position 1.

userid

string (required)

position

integer (required, range: 1-50)

callback

callback (optional)

Example

This is not a parameter!

bot.moveDJ('xxxxxxxxxxxxxxxxxxxxxxxx',4);

skipSong: ([ callback:fn ])

Skips the current song. You need to be DJ or have the permission to skip a song.

callback

callback (optional)

Example

This is not a parameter!

bot.skipSong();

getUsers: ()

Returns an object containing all the users currently in the room at the moment of calling. Identical to Plug.DJ's API.getUsers()

getAmbassadors: ()

Returns array containing ambassadors currently in the room

getAudience: ()

getDJs: ()

getUsers: ()

getUser: (id)

getSelf: ()

getStaff: ()

getAdmins: ()

getAmbassadors: ()

getHost: ()

getMedia: ()

getWaitList: ()

getRoomScore: ()

sendChat: (message)

waitListJoin: ()

waitListLeave: ()

moderateForceSkip: ()

moderateAddDJ: (id)

moderateRemoveDJ: (id)

moderateKickUser: (id, reason)

moderateDeleteChat: (chatID)

createPlaylist: (name, callback)

addSongToPlaylist: (playlist id, song id, callback)

getPlaylists: (callback)

activatePlaylist: (playlist id, callback)

playlistMoveSong: (playlist, song id, position, callback)

The 'playlist' argument must be a playlist object, the type that is returned from getPlaylists(). Song id is the the id of the song you wish to move, position an integer of where in the playlist it should be moved to (0 = first).

Clone this wiki locally