Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/appellation/discord.js-music

Music for discord.js
https://github.com/appellation/discord.js-music

Last synced: about 8 hours ago
JSON representation

Music for discord.js

Awesome Lists containing this project

README

        

# Discord.js Music
A module that adds simple music functionality to Discord.js

### Reference
`Playlist` *extends* [`CassettePlaylist`](https://github.com/appellation/cassette#reference)
- *static* **ensureVoiceConnection(channel: VoiceChannel)**: `Promise` 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` start playback in a channel

#### example
```js
// 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);
```