Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/appellation/discord.js-music
- Owner: appellation
- Created: 2017-09-04T20:56:08.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-15T16:37:24.000Z (over 6 years ago)
- Last Synced: 2024-11-10T09:07:37.997Z (5 days ago)
- Language: TypeScript
- Size: 83 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
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);
```