Current collected state Current
Observed since 20 Oct, 19:17 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
2pg-music
Discord.js music used for 2PG
Simple music module, built with TypeScript, used by 2PG.
Docs - https://theadamjr.github.io/2pg-music
npm i -S 2pg-music discord.js
ES6:
import { Client } from 'discord.js';
import { MusicClient } from '2pg-music';
const music = new MusicClient();
const bot = new Client();
music.on('trackStart', ({ textChannel }, track) => textChannel?.send(`\`${track.title}\` - **${track.requestor}** started.`));
bot.on('message', async (msg) => {
if (msg.author.bot) return;
if (msg.content === '.play') {
const player = getPlayer(msg);
await player.play('discord bot dashboard intro', { member: msg.member });
}
});
function getPlayer(msg) {
return music.get(msg.guild.id)
?? music.create({
voiceChannel: msg.member.voice.channel,
textChannel: msg.channel
});
}
bot.login('<your_bot_token>');
Download counts and popularity will appear here as the collector receives them.
| Package / target | Requirement | Relationship |
|---|---|---|
@discordjs/opusEnvironment{
"local_name": "@discordjs/opus",
"alias": false,
"peer_metadata": null
} | ^0.3.3 | runtime |
ffmpeg-staticEnvironment{
"local_name": "ffmpeg-static",
"alias": false,
"peer_metadata": null
} | ^4.2.7 | runtime |
yt-searchEnvironment{
"local_name": "yt-search",
"alias": false,
"peer_metadata": null
} | ^2.4.1 | runtime |
ytdl-coreEnvironment{
"local_name": "ytdl-core",
"alias": false,
"peer_metadata": null
} | ^4.0.3 | runtime |
@types/yt-searchEnvironment{
"local_name": "@types/yt-search",
"alias": false,
"peer_metadata": null
} | ^2.3.0 | development |
discord.jsEnvironment{
"local_name": "discord.js",
"alias": false,
"peer_metadata": null
} | ^12.4.1 | development |
Source distribution
{
"integrity": "sha512-TCeLnY7EtdmUMRsDxhXfWJVHuQ2hAaSAy+GBXe1y7Ur1CMUMkLBXdvrt8aPCjxr7mhcMDbNsllYM0FDXqvPSaw==",
"shasum": "cd9e9a2ad8e98df737bd163b46f4b3e16c738382",
"tarball": "https://registry.npmjs.org/2pg-music/-/2pg-music-1.0.3.tgz",
"fileCount": 6,
"unpackedSize": 10690,
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfoZZOCRA9TVsSAnZWagAA8GwP/RMeeguLkrD0TUWjwvxX\nwDjyVP2KfJC+kdxDGO/1QQJq3F9q8NmB33Nt77qnl16zn4zmstyArzn/XLVv\nJC6s0+f2a/zfMUMAO2S1MKcxVjOfmoJaXXUjLFRjo6LKxgGRxoGyrixMK2Fm\nqpuJb2OLODuq+rxcvL4JAwQAme7bCKpovpm3v4j8bjyboi6NsGltBWzolhxF\nwbujzZ8xUcF5P5Sq68yfTqcllp+wTn2DW1SjuVGURxhvPW1pqg62IKRAklIi\n8K7u3iGOTVKsGcEu6pWlL/4SiR1lKRZTSkOUQKofnREAysr78kWLfxsZidES\nubIyJsMZb12GRkbMsrAaGRVy5zV64oZOPYhrZvUcasVCGTxKwkWWa9YC1Aw4\n6eg5lIN0aOzxK16/NIfRnEM61JM8DIdvQeJaESIXbNQLbw9yeXvgVGQbB4lG\n71RjCwS+mlLIF04C8bKv0soiuhApTpsQs+wZIOxwq8VP8olPlH/v/DxFWyGV\nFr5r0MRE/REOoHwnw4eeyPv9TY1PZte1KwUkfz4/SuurAsPwHANjxKNIzL4T\n19num3wGJAcI9i9aCeYMcqfce3K8owM7BFIprk3o21skXEJ315cG/rjlQZGQ\ndHDcm00MczJAMYYivnYO9LW/NuDkiRLaqVPcqDeDk8RVptJIRmK3hdPuzEPV\n4Vee\r\n=yBG0\r\n-----END PGP SIGNATURE-----\r\n",
"signatures": [
{
"keyid": "SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA",
"sig": "MEQCIBlNgehZHJqEKNvNLZ+BdQWwqYLFmviLHTsyeKmCRTCyAiBR0vmI3CnpiuOqFUeBT0J8mDR/u8zsNPgT2I831pH+pQ=="
}
]
}Observed since 20 Oct, 19:17 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package_version:e77657c9d7d7df18be4e49f11abe6fe050c28c25d1b65533e975aafdf46d8e67