discord.js-music
TypeScript icon, indicating that this package has built-in type declarations

2.1.0 • Public • Published

Discord.js Music

A module that adds simple music functionality to Discord.js

Reference

Playlist extends CassettePlaylist

  • static ensureVoiceConnection(channel: VoiceChannel): Promise<VoiceConnection> ensure a voice connection.

  • constructor(guild: Guild)

  • guild: Guild (readonly) the guild for this playlist

  • playing: boolean (readonly) whether the playlist is currently playing

  • stop(): void temporarily stop the playlist without destroying it

  • destroy(): void stop the playlist and destroy it

  • pause(): void pause playlist playback

  • resume(): void resume playlist playback

  • start(channel: VoiceChannel): Promise<void> start playback in a channel

example

// in your main file
require('discord.js-music');
 
// in some command
const playlist = message.guild.playlist;
await playlist.add(message.content);
return playlist.start(message.member.voiceChannel);

Readme

Keywords

none

Package Sidebar

Install

npm i discord.js-music

Weekly Downloads

30

Version

2.1.0

License

ISC

Last publish

Collaborators

  • appellation