Player

Represents a player in a Guild.

Properties

  • connected
  • connection
  • current
  • data
  • deaf
  • filters
  • loop
  • mute
  • node
  • riffy
  • options
  • paused
  • ping
  • playing
  • position
  • queue
  • textChannel
  • timestamp
  • value
  • voiceChannel
  • volume

Methods

.play()

Players starts playing the song from queue.

Returns Promise<void>


.autoplay(Player)

Player auto-plays the song after the queue ends.

Returns Promise<Player>


.connect(options)

Player make the bot to join the voiceChannel

Returns: void

Example:

await Player.connect({guildId: "9347623649232434", voiceChannel: "3874928743294712", deaf: true, mute: false})
.catch(e => console.log("Missing permission to Join the voice channel"));

.stop()

Player stops playing current song and jumps to next one in the queue.

Returns: void


.pause(Boolean)

Pause and resumes the player

Returns: Player


.seek(Number)

Seek to a certain part of the song

Returns: void


.setVolume(Number)

Change volume of the player

Returns: Player

Example:

Player.setVolume(70);

.setLoop(options)

Update loop settings of Player

Returns: Player


.setTextChannel(Id)

Update Text Channel of the player

Returns: Player


.setVoiceChannel(id, options)

Update VoiceChannel of player

Returns: Player

Example

Player.setVoiceChannel("340304284928342303", {deaf: true, mute: false});

.disconnect()

Disconnect the player

Returns: Player


.destroy()

Destroy the player

Returns: void