diff --git a/.env_example b/.env_example new file mode 100644 index 00000000..2d0a1cd6 --- /dev/null +++ b/.env_example @@ -0,0 +1,3 @@ +DISCORD_API_TOKEN= +BOT_PREFIX= +YOUTUBE_API_KEY= diff --git a/Dockerfile b/Dockerfile index e13e32b9..2eee3a1f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,6 +3,9 @@ FROM docker.io/node:20-alpine #Dependencies RUN apk add --virtual .build-deps python3 make g++ gcc git +#Code Dependencies +RUN apk add --virtual .code-deps ffmpeg + WORKDIR /usr/src/app COPY / /usr/src/app/ diff --git a/index.js b/index.js index 4cd7fc65..1fef82be 100644 --- a/index.js +++ b/index.js @@ -1,102 +1,94 @@ -const { Client, Util } = require('discord.js'); +const { AudioPlayerStatus, createAudioPlayer, createAudioResource, getVoiceConnection, joinVoiceChannel, NoSubscriberBehavior } = require('@discordjs/voice'); +const { Client, ActivityType, PermissionFlagsBits } = require('discord.js'); const Discord = require('discord.js'); const YouTube = require('simple-youtube-api') const ytdl = require('ytdl-core'); -const PREFIX = ('-') -const client = new Client({ disableEveryone: true }); -const youtube = new YouTube(process.env.API_KEY); -const queue = new Map(); -client.login(process.env.BOT_TOKEN); -client.on('ready', () => { - client.user.setActivity('-help', { type: 'LISTENING' }) - client.user.setStatus('dnd'); +const PREFIX = (process.env.BOT_PREFIX ?? "mx>"); +const client = new Client({ + intents: [ + "Guilds", + "GuildMessages", + "GuildVoiceStates", + "MessageContent" + ], + disableMentions: 'everyone' }); -client.on('message', async msg => { +const youtube = new YouTube(process.env.YOUTUBE_API_KEY); +const queue = new Map(); +client.login(process.env.DISCORD_API_TOKEN); +client.on('ready', () => { + client.user.setActivity(`${PREFIX}help`, { type: ActivityType.Listening }) + client.user.setStatus('online'); +}); +client.on('messageCreate', async msg => { if (!msg.guild || msg.author.bot) return; - if (msg.content.toUpperCase().startsWith(`MUSIX`)) { - msg.channel.send('-help to see my commands.') - } if (msg.content.startsWith(`${PREFIX}`)) { - var guildms = client.guilds.find(x => x.name === 'Musix Support') - var channelms = guildms.channels.find(x => x.name === 'log') - var guildId = msg.guild.id - if (!client.voiceConnections.has(guildId)) { - const embed = new Discord.RichEmbed() - .setTitle(`**User:** ${msg.author.id}, ${msg.member.displayName}, ${msg.author.tag}`) - .addField(`**Message channel:** ${msg.channel.name}`, `Client is not in a Voice channel.`) - .addField(`**Message Content:** ${msg.content}`, `**Message Guild:** ${msg.guild.name}, ${msg.guild.id}`) - .setColor('#b50002') - channelms.send(embed) - } else { - const embed = new Discord.RichEmbed() - .setTitle(`**User:** ${msg.author.id}, ${msg.member.displayName}, ${msg.author.tag}`) - .addField(`**Message channel:** ${msg.channel.name}`, `**Voice channel:** ${client.voiceConnections.get(guildId).channel.name}, User Voice channel: ${msg.member.voiceChannel}`) - .addField(`**Message Content:** ${msg.content}`, `**Message Guild:** ${msg.guild.name}, ${msg.guild.id}`) - .setColor('#b50002') - channelms.send(embed) - } if (msg.content === `${PREFIX}ping`) { - msg.channel.send(`My current Ping: **${Math.floor(client.ping * 10) / 10} ms**.`) + msg.channel.send(`My current Ping: **${Math.floor(client.ws.ping * 10) / 10} ms**.`); return; } if (msg.content === `${PREFIX}help`) { - const embed = new Discord.RichEmbed() - .setTitle('Commands for Musix!') - .addField('```-play | -p```', 'Play a song.', true) - .addField('```-queue | -q```', 'Display the queue.', true) - .addField('```-nowplaying | -np```', 'Display whats currently playing.', true) - .addField('```-volume```', 'Change or check the volume.', true) - .addField('```-pause```', 'Pause the music.', true) - .addField('```-resume```', 'Resume the music.', true) - .addField('```-stop```', 'Stop the music, Clear the queue and leave the current voice channel.', true) - .addField('```-skip | -s```', 'Skip a song.', true) - .addField('```-invite```', 'Invite Musix.', true) - .addField('```-ping```', 'See the current ping for Musix', true) - .addField('```-info```', 'Display info and instructions.', true) - .addField('```-help```', 'Display the help.', true) - .setAuthor('Musix', 'https://cdn.discordapp.com/avatars/572405135658188800/04c6f22b7600ddecfbc245dd3ec10f9f.png?size=2048') - .setColor('#b50002') - msg.channel.send(embed); + const embed = new Discord.EmbedBuilder() + .setTitle('Commands for ' + client.user.username + '!') + .addFields( + { name: '```' + `${PREFIX}` + 'play | ' + `${PREFIX}` + 'p```', value: 'Play a song.', inline: true }, + { name: '```' + `${PREFIX}` + 'queue | ' + `${PREFIX}` + 'q```', value: 'Display the queue.', inline: true }, + { name: '```' + `${PREFIX}` + 'nowplaying | ' + `${PREFIX}` + 'np```', value: 'Display whats currently playing.', inline: true }, + { name: '```' + `${PREFIX}` + 'volume```', value: 'Change or check the volume.', inline: true }, + { name: '```' + `${PREFIX}` + 'pause```', value: 'Pause the music.', inline: true }, + { name: '```' + `${PREFIX}` + 'resume```', value: 'Resume the music.', inline: true }, + { name: '```' + `${PREFIX}` + 'stop```', value: 'Stop the music, Clear the queue and leave the current voice channel.', inline: true }, + { name: '```' + `${PREFIX}` + 'skip | ' + `${PREFIX}` + 's```', value: 'Skip a song.', inline: true }, + { name: '```' + `${PREFIX}` + 'invite```', value: 'Invite ' + client.user.username + '.', inline: true }, + { name: '```' + `${PREFIX}` + 'ping```', value: 'See the current ping for ' + client.user.username, inline: true }, + { name: '```' + `${PREFIX}` + 'info```', value: 'Display info and instructions.', inline: true }, + { name: '```' + `${PREFIX}` + 'help```', value: 'Display the help.', inline: true } + ) + .setAuthor({ name: client.user.username, iconURL: client.user.avatarURL() }) + .setColor('#b50002'); + msg.channel.send({ embeds: [embed] }); return undefined; } if (msg.content === `${PREFIX}info`) { var line = '**>-----------------------------------------------------------------------<**'; - var dj = msg.guild.roles.find(x => x.name === 'DJ') ? true : false; - const embed = new Discord.RichEmbed() - .setTitle('**Musix instructions and info**:') - .addField('If your current guild has a role called \'DJ\' you will need it to use music commands! If your current guild doesn\'t have a role called \'DJ\' everyone can use music commands!', 'DJ role existance: ' + dj, true) - .addField('If you encounter any errors with musix please report about them on the offical musix support server!', 'https://discord.gg/rvHuJtB', true) - .addField('On errors you can do -stop to reset the queue and try again!', line, true) - .addField('Current Ping in milliseconds', `${Math.floor(client.ping * 10) / 10} ms`, true) - .addField('Be careful with the Volume command! Volume is not recommended to be put over 3 with user volume at 100%!', 'Volume will reset to 1 always when a new song begins!', true) - .setAuthor('Musix', 'https://cdn.discordapp.com/avatars/572405135658188800/04c6f22b7600ddecfbc245dd3ec10f9f.png?size=2048') - .setColor('#b50002') - msg.channel.send(embed); + var dj = msg.guild.roles.cache.find(x => x.name === 'DJ') ? true : false; + const embed = new Discord.EmbedBuilder() + .setTitle('**' + client.user.username + ' instructions and info**:') + .addFields( + { name: 'If your current guild has a role called \'DJ\' you will need it to use music commands! If your current guild doesn\'t have a role called \'DJ\' everyone can use music commands!', value:'DJ role existance: ' + dj, inline: true }, + { name: 'If you encounter any errors with ' + client.user.username + ' please report about them on the offical ' + client.user.username + ' support server!', value: 'https://discord.gg/rvHuJtB', inline: true }, + { name: `On errors you can do ${PREFIX}stop to reset the queue and try again!`, value: line, inline: true }, + { name: 'Current Ping in milliseconds', value: `${Math.floor(client.ws.ping * 10) / 10} ms`, inline: true }, + { name: 'Be careful with the Volume command! Volume is not recommended to be put over 3 with user volume at 100%!', value: 'Volume will reset to 1 always when a new song begins!', inline: true } + ) + .setAuthor({ name: client.user.username, iconURL: client.user.avatarURL() }) + .setColor('#b50002'); + msg.channel.send({ embeds: [embed] }); return undefined; } if (msg.content === `${PREFIX}invite`) { - msg.channel.send('Invite me with: https://bit.ly/2VGcuBR') + msg.channel.send('Invite me with:' + '\n' + 'https://discord.com/oauth2/authorize?client_id=' + client.user.id + '&permissions=2184465408&scope=applications.commands+bot'); return undefined; } - if (msg.member.guild.roles.find(x => x.name === 'DJ')) { - if (msg.member.roles.find(x => x.name === 'DJ')) { + if (msg.member.guild.roles.cache.find(x => x.name === 'DJ')) { + if (msg.member.roles.cache.find(x => x.name === 'DJ')) { const args = msg.content.split(' '); const searchString = args.slice(1).join(' '); const url = args[1] ? args[1].replace(/<(.+)>/g, '$1') : ''; const serverQueue = queue.get(msg.guild.id); let command = msg.content.toLowerCase().split(' ')[0]; - command = command.slice(PREFIX.length) + command = command.slice(PREFIX.length); if (command === 'play' || command === 'p') { if (!args[1]) return msg.channel.send(':x: I\'m sorry but you didn\'t specify a song'); - const voiceChannel = msg.member.voiceChannel; + const voiceChannel = msg.member.voice.channel; if (!voiceChannel) return msg.channel.send(':x: I\'m sorry but you need to be in a voice channel to play music!'); const permissions = voiceChannel.permissionsFor(msg.client.user); - if (!permissions.has('CONNECT')) { + if (!permissions.has(PermissionFlagsBits.Connect)) { return msg.channel.send(':x: I cannot connect to your voice channel, make sure I have the proper permissions!'); } - if (!permissions.has('SPEAK')) { + if (!permissions.has(PermissionFlagsBits.Speak)) { return msg.channel.send(':x: I cannot speak in this voice channel, make sure I have the proper permissions!'); } if (url.match(/^https?:\/\/(www.youtube.com|youtube.com)\/playlist(.*)$/)) { @@ -117,11 +109,13 @@ client.on('message', async msg => { msg.channel.send(` __**Song selection:**__ ${videos.map(video2 => `**${++index} -** ${video2.title}`).join('\n')} -Please provide a value to select one of the search results ranging from __1-10__. +Please provide a value to select one of the search results ranging from 1-10. `); + try { - var response = await msg.channel.awaitMessages(msg2 => msg2.content > 0 && msg2.content < 11, { - maxMatches: 1, + var response = await msg.channel.awaitMessages({ + filter: msg2 => msg2.content > 0 && msg2.content < 11, + max: 1, time: 10000, errors: ['time'] }); @@ -129,6 +123,7 @@ Please provide a value to select one of the search results ranging from __1-10__ return msg.channel.send(':x: Cancelling song selection.'); } const videoIndex = parseInt(response.first().content); + var video = await youtube.getVideoByID(videos[videoIndex - 1].id); } catch (err) { return msg.channel.send(':x: I could not obtain any search results.'); @@ -137,26 +132,26 @@ Please provide a value to select one of the search results ranging from __1-10__ return handleVideo(video, msg, voiceChannel); } } else if (command === 'skip' || command === 's') { - if (!msg.member.voiceChannel) return msg.channel.send(':x: You are not in a voice channel!'); + if (!msg.member.voice.channel) return msg.channel.send(':x: You are not in a voice channel!'); if (!serverQueue) return msg.channel.send(':x: There is nothing playing that I could skip for you.'); if (!serverQueue.songs[1]) return msg.channel.send(':x: Theres nothing to skip to!') - serverQueue.connection.dispatcher.end('Skipped'); + serverQueue.audioPlayer.stop(); return; } else if (command === 'stop') { - if (!msg.member.voiceChannel) return msg.channel.send(':x: You are not in a voice channel!'); + if (!msg.member.voice.channel) return msg.channel.send(':x: You are not in a voice channel!'); if (!serverQueue) return msg.channel.send(':x: There is nothing playing that I could stop for you.'); serverQueue.songs = []; - serverQueue.connection.dispatcher.end('Stopped!'); + serverQueue.audioPlayer.stop(); return; } else if (command === 'volume') { - if (!msg.member.voiceChannel) return msg.channel.send(':x: You are not in a voice channel!'); + if (!msg.member.voice.channel) return msg.channel.send(':x: You are not in a voice channel!'); if (!serverQueue) return msg.channel.send(':x: There is nothing playing.'); if (!args[1]) return msg.channel.send(`The current volume is: **${serverQueue.volume}** :speaker:`); if (isNaN(args[1])) { return msg.channel.send(':x: I\'m sorry, But you need to enter a valid __number__.') } serverQueue.volume = args[1]; - serverQueue.connection.dispatcher.setVolumeLogarithmic(args[1] / 5); + serverQueue.audioResource.volume.setVolume(args[1] / 100); return msg.channel.send(`I set the volume to: **${args[1]}** 🔊`); } else if (command === 'np' || command === 'nowplaying') { if (!serverQueue) return msg.channel.send(':x: There is nothing playing.'); @@ -174,41 +169,27 @@ ${serverQueue.songs.map(song => `**-** ${song.title}`).join("\n")} } else if (command === 'pause') { if (serverQueue && serverQueue.playing) { serverQueue.playing = false; - serverQueue.connection.dispatcher.pause(); + serverQueue.audioPlayer.pause(); return msg.channel.send(':pause_button: Paused the music for you!'); } return msg.channel.send(':x: There is nothing playing.'); } else if (command === 'resume') { if (serverQueue && !serverQueue.playing) { serverQueue.playing = true; - serverQueue.connection.dispatcher.resume(); + serverQueue.audioPlayer.unpause(); return msg.channel.send(':play_pause: Resumed the music for you!'); } return msg.channel.send(':x: There is nothing playing.'); - } else if (msg.content === '-devstop') { - if (msg.author.id === '360363051792203779') { - serverQueue.songs = []; - serverQueue.connection.dispatcher.end('Stop'); - return - } - } else if (msg.content.startsWith('-eval')) { - if (msg.author.id === '360363051792203779' || msg.author.id === '384002606621655040') { - const args = msg.content.slice(6) - msg.channel.send(eval(args)); - return - } else { - msg.channel.send('The evaluation command is only avaiable for the developers of Musix!') - } } if (msg.content === `${PREFIX}`) return; msg.channel.send(':x: Unknown command! Type -help for the list of commands!') return; } if (msg.content === `${PREFIX}`) return; - var coms = ['-play', '-queue', '-np', '-volume', '-pause', '-resume', '-stop', '-skip', '-ping', '-q', '-nowplaying', '-p', '-s', '-devstop', '-eval']; + var coms = [`${PREFIX}play`, `${PREFIX}queue`, `${PREFIX}np`, `${PREFIX}volume`, `${PREFIX}pause`, `${PREFIX}resume`, `${PREFIX}stop`, `${PREFIX}skip`, `${PREFIX}ping`, `${PREFIX}q`, `${PREFIX}nowplaying`, `${PREFIX}p`, `${PREFIX}s`]; for (var i = 0; i < coms.length; i++) { if (msg.content.includes(coms[i])) { - if (!msg.member.roles.find(x => x.name === 'DJ')) { + if (!msg.member.roles.cache.find(x => x.name === 'DJ')) { msg.channel.send(':x: i\'m sorry but you need to have the \'DJ\' role to use music commands!') return; } @@ -227,13 +208,13 @@ ${serverQueue.songs.map(song => `**-** ${song.title}`).join("\n")} if (command === 'play' || command === 'p') { if (!args[1]) return msg.channel.send(':x: I think you forgot what you wanted to play!'); - const voiceChannel = msg.member.voiceChannel; + const voiceChannel = msg.member.voice.channel; if (!voiceChannel) return msg.channel.send(':x: I\'m sorry but you need to be in a voice channel to play music!'); const permissions = voiceChannel.permissionsFor(msg.client.user); - if (!permissions.has('CONNECT')) { + if (!permissions.has(PermissionFlagsBits.Connect)) { return msg.channel.send(':x: I cannot connect to your voice channel, make sure I have the proper permissions!'); } - if (!permissions.has('SPEAK')) { + if (!permissions.has(PermissionFlagsBits.Speak)) { return msg.channel.send(':x: I cannot speak in this voice channel, make sure I have the proper permissions!'); } @@ -277,27 +258,27 @@ Please provide a value to select one of the search results ranging from 1-10. return handleVideo(video, msg, voiceChannel); } } else if (command === 'skip' || command === 's') { - if (!msg.member.voiceChannel) return msg.channel.send(':x: You are not in a voice channel!'); + if (!msg.member.voice.channel) return msg.channel.send(':x: You are not in a voice channel!'); if (!serverQueue) return msg.channel.send(':x: There is nothing playing that I could skip for you.'); msg.channel.send('Skipped :thumbsup:') - serverQueue.connection.dispatcher.end('Skipped'); + serverQueue.audioPlayer.stop(); return undefined; } else if (command === 'stop') { - if (!msg.member.voiceChannel) return msg.channel.send(':x: You are not in a voice channel!'); + if (!msg.member.voice.channel) return msg.channel.send(':x: You are not in a voice channel!'); if (!serverQueue) return msg.channel.send(':x: There is nothing playing that I could stop for you.'); msg.channel.send('Stopped the music! :stop_button:') serverQueue.songs = []; - serverQueue.connection.dispatcher.end('Stopped!'); + serverQueue.audioPlayer.stop(); return undefined; } else if (command === 'volume') { - if (!msg.member.voiceChannel) return msg.channel.send(':x: You are not in a voice channel!'); + if (!msg.member.voice.channel) return msg.channel.send(':x: You are not in a voice channel!'); if (!serverQueue) return msg.channel.send(':x: There is nothing playing.'); if (!args[1]) return msg.channel.send(`The current volume is: **${serverQueue.volume}** :speaker:`); if (isNaN(args[1])) { return msg.channel.send(':x: I\'m sorry, But you need to enter a valid __number__.') } serverQueue.volume = args[1]; - serverQueue.connection.dispatcher.setVolumeLogarithmic(args[1] / 5); + serverQueue.audioResource.volume.setVolume(args[1] / 100); return msg.channel.send(`I set the volume to: **${args[1]}** 🔊`); } else if (command === 'np' || command === 'nowplaying') { if (!serverQueue) return msg.channel.send(':x: There is nothing playing.'); @@ -315,31 +296,17 @@ ${serverQueue.songs.map(song => `**-** ${song.title}`).join("\n")} } else if (command === 'pause') { if (serverQueue && serverQueue.playing) { serverQueue.playing = false; - serverQueue.connection.dispatcher.pause(); + serverQueue.audioPlayer.pause(); return msg.channel.send(':pause_button: Paused the music for you!'); } return msg.channel.send(':x: There is nothing playing.'); } else if (command === 'resume') { if (serverQueue && !serverQueue.playing) { serverQueue.playing = true; - serverQueue.connection.dispatcher.resume(); + serverQueue.audioPlayer.unpause(); return msg.channel.send(':play_pause: Resumed the music for you!'); } return msg.channel.send(':x: There is nothing playing.'); - } else if (msg.content === '-devstop') { - if (msg.author.id === '360363051792203779') { - serverQueue.songs = []; - serverQueue.connection.dispatcher.end('Stop'); - return - } - } else if (msg.content.startsWith('-eval')) { - if (msg.author.id === '360363051792203779' || msg.author.id === '384002606621655040') { - const args = msg.content.slice(6) - msg.channel.send(eval(args)); - return - } else { - msg.channel.send('The evaluation command is only avaiable for the developers of Musix!') - } } } if (msg.content === `${PREFIX}`) { @@ -354,7 +321,7 @@ async function handleVideo(video, msg, voiceChannel, playlist = false) { const serverQueue = queue.get(msg.guild.id); const song = { id: video.id, - title: Util.escapeMarkdown(video.title), + title: video.title, url: `https://www.youtube.com/watch?v=${video.id}` }; if (!serverQueue) { @@ -362,16 +329,29 @@ async function handleVideo(video, msg, voiceChannel, playlist = false) { textChannel: msg.channel, voiceChannel: voiceChannel, connection: null, + audioPlayer: createAudioPlayer({ + behaviors: { + noSubscriber: NoSubscriberBehavior.Play, + } + }), + audioResource: null, songs: [], - volume: 5, + volume: 50, playing: true }; + queue.set(msg.guild.id, queueConstruct); queueConstruct.songs.push(song); try { - var connection = await voiceChannel.join(); + const connection = + getVoiceConnection(voiceChannel.guild.id) ?? + joinVoiceChannel({ + channelId: voiceChannel.id, + guildId: voiceChannel.guild.id, + adapterCreator: voiceChannel.guild.voiceAdapterCreator + }); queueConstruct.connection = connection; play(msg.guild, queueConstruct.songs[0]); } catch (error) { @@ -391,21 +371,30 @@ function play(guild, song) { const serverQueue = queue.get(guild.id); if (!song) { - serverQueue.voiceChannel.leave(); + serverQueue.connection.destroy(); queue.delete(guild.id); return; } - const dispatcher = serverQueue.connection.playStream(ytdl(song.url, { quality: `highestaudio`, filter: 'audioonly' })) - .on('end', reason => { - if (reason === 'Stream is not generating quickly enough.') console.log('Song ended.'); - else console.log(reason); + serverQueue.audioPlayer + .on(AudioPlayerStatus.Idle, () => { serverQueue.songs.shift(); + serverQueue.audioPlayer.removeAllListeners(); play(guild, serverQueue.songs[0]); }) - .on('error', error => console.error(error)); - dispatcher.setVolumeLogarithmic(1 / 5); - serverQueue.volume = 1 + .on('error', (error) => { + console.error(error) + }); + + const audioResource = createAudioResource(ytdl(song.url, { quality: `highestaudio`, filter: 'audioonly' }),{ + inlineVolume: true + }); + + audioResource.volume.setVolume(serverQueue.volume / 100); + + serverQueue.audioPlayer.play(audioResource); + serverQueue.audioResource = audioResource; + serverQueue.connection.subscribe(serverQueue.audioPlayer); serverQueue.textChannel.send(`:musical_note: Start playing: **${song.title}**`); -} \ No newline at end of file +} diff --git a/package-lock.json b/package-lock.json index 4f7f25b2..ddc2ba17 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,9 +9,10 @@ "version": "1.2.2", "license": "MIT", "dependencies": { + "@discordjs/opus": "^0.9.0", + "@discordjs/voice": "^0.16.1", "discord.js": "^14.14.1", "ms": "^2.1.3", - "opusscript": "0.1.1", "request": "^2.88.2", "simple-youtube-api": "^5.2.1", "ytdl-core": "^4.11.5" @@ -56,6 +57,38 @@ "node": ">=16.11.0" } }, + "node_modules/@discordjs/node-pre-gyp": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/@discordjs/node-pre-gyp/-/node-pre-gyp-0.4.5.tgz", + "integrity": "sha512-YJOVVZ545x24mHzANfYoy0BJX5PDyeZlpiJjDkUBM/V/Ao7TFX9lcUvCN4nr0tbr5ubeaXxtEBILUrHtTphVeQ==", + "dependencies": { + "detect-libc": "^2.0.0", + "https-proxy-agent": "^5.0.0", + "make-dir": "^3.1.0", + "node-fetch": "^2.6.7", + "nopt": "^5.0.0", + "npmlog": "^5.0.1", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "tar": "^6.1.11" + }, + "bin": { + "node-pre-gyp": "bin/node-pre-gyp" + } + }, + "node_modules/@discordjs/opus": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/@discordjs/opus/-/opus-0.9.0.tgz", + "integrity": "sha512-NEE76A96FtQ5YuoAVlOlB3ryMPrkXbUCTQICHGKb8ShtjXyubGicjRMouHtP1RpuDdm16cDa+oI3aAMo1zQRUQ==", + "hasInstallScript": true, + "dependencies": { + "@discordjs/node-pre-gyp": "^0.4.5", + "node-addon-api": "^5.0.0" + }, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/@discordjs/rest": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@discordjs/rest/-/rest-2.2.0.tgz", @@ -91,6 +124,21 @@ "node": ">=16.11.0" } }, + "node_modules/@discordjs/voice": { + "version": "0.16.1", + "resolved": "https://registry.npmjs.org/@discordjs/voice/-/voice-0.16.1.tgz", + "integrity": "sha512-uiWiW0Ta6K473yf8zs13RfKuPqm/xU4m4dAidMkIdwqgy1CztbbZBtPLfDkVSKzpW7s6m072C+uQcs4LwF3FhA==", + "dependencies": { + "@types/ws": "^8.5.9", + "discord-api-types": "0.37.61", + "prism-media": "^1.3.5", + "tslib": "^2.6.2", + "ws": "^8.14.2" + }, + "engines": { + "node": ">=16.11.0" + } + }, "node_modules/@discordjs/ws": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/@discordjs/ws/-/ws-1.0.2.tgz", @@ -165,9 +213,9 @@ } }, "node_modules/@types/ws": { - "version": "8.5.9", - "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.9.tgz", - "integrity": "sha512-jbdrY0a8lxfdTp/+r7Z4CkycbOFN8WX+IOchLJr3juT/xzbJ8URyTVSJ/hvNdadTgM1mnedb47n+Y31GsFnQlg==", + "version": "8.5.10", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.10.tgz", + "integrity": "sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==", "dependencies": { "@types/node": "*" } @@ -184,8 +232,18 @@ "node_modules/abbrev": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", - "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", - "dev": true + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" + }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } }, "node_modules/ajv": { "version": "6.12.6", @@ -202,6 +260,14 @@ "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "engines": { + "node": ">=8" + } + }, "node_modules/anymatch": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", @@ -215,6 +281,23 @@ "node": ">= 8" } }, + "node_modules/aproba": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", + "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==" + }, + "node_modules/are-we-there-yet": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz", + "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==", + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/asn1": { "version": "0.2.6", "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", @@ -252,8 +335,7 @@ "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, "node_modules/bcrypt-pbkdf": { "version": "1.0.2", @@ -276,7 +358,6 @@ "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -323,6 +404,22 @@ "fsevents": "~2.3.2" } }, + "node_modules/chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "engines": { + "node": ">=10" + } + }, + "node_modules/color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "bin": { + "color-support": "bin.js" + } + }, "node_modules/combined-stream": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", @@ -337,8 +434,12 @@ "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==" + }, + "node_modules/console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==" }, "node_modules/core-util-is": { "version": "1.0.2", @@ -360,7 +461,6 @@ "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dev": true, "dependencies": { "ms": "2.1.2" }, @@ -376,8 +476,7 @@ "node_modules/debug/node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/delayed-stream": { "version": "1.0.0", @@ -387,6 +486,19 @@ "node": ">=0.4.0" } }, + "node_modules/delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==" + }, + "node_modules/detect-libc": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz", + "integrity": "sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==", + "engines": { + "node": ">=8" + } + }, "node_modules/discord-api-types": { "version": "0.37.61", "resolved": "https://registry.npmjs.org/discord-api-types/-/discord-api-types-0.37.61.tgz", @@ -416,6 +528,34 @@ "node": ">=16.11.0" } }, + "node_modules/discord.js/node_modules/@types/ws": { + "version": "8.5.9", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.9.tgz", + "integrity": "sha512-jbdrY0a8lxfdTp/+r7Z4CkycbOFN8WX+IOchLJr3juT/xzbJ8URyTVSJ/hvNdadTgM1mnedb47n+Y31GsFnQlg==", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/discord.js/node_modules/ws": { + "version": "8.14.2", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz", + "integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, "node_modules/ecc-jsbn": { "version": "0.1.2", "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", @@ -425,6 +565,11 @@ "safer-buffer": "^2.1.0" } }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + }, "node_modules/extend": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", @@ -481,6 +626,33 @@ "node": ">= 0.12" } }, + "node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" + }, "node_modules/fsevents": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", @@ -495,6 +667,25 @@ "node": "^8.16.0 || ^10.6.0 || >=11.0.0" } }, + "node_modules/gauge": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz", + "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==", + "dependencies": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.2", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.1", + "object-assign": "^4.1.1", + "signal-exit": "^3.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.2" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/getpass": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", @@ -503,6 +694,25 @@ "assert-plus": "^1.0.0" } }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/glob-parent": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", @@ -545,6 +755,11 @@ "node": ">=4" } }, + "node_modules/has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==" + }, "node_modules/http-signature": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", @@ -559,12 +774,38 @@ "npm": ">=1.3.7" } }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/ignore-by-default": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/ignore-by-default/-/ignore-by-default-1.0.1.tgz", "integrity": "sha512-Ius2VYcGNk7T90CppJqcIkS5ooHUZyIQK+ClZfMfMNFEF9VSE73Fq+906u/CWu92x4gzZMWOwfFYckPObzdEbA==", "dev": true }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -586,6 +827,14 @@ "node": ">=0.10.0" } }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "engines": { + "node": ">=8" + } + }, "node_modules/is-glob": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", @@ -670,7 +919,6 @@ "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, "dependencies": { "yallist": "^4.0.0" }, @@ -695,6 +943,28 @@ "resolved": "https://registry.npmjs.org/magic-bytes.js/-/magic-bytes.js-1.8.0.tgz", "integrity": "sha512-lyWpfvNGVb5lu8YUAbER0+UMBTdR63w2mcSUlhhBTyVbxJvjgqwyAf3AZD6MprgK0uHuBoWXSDAMWLupX83o3Q==" }, + "node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-dir/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "bin": { + "semver": "bin/semver.js" + } + }, "node_modules/mime-db": { "version": "1.52.0", "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", @@ -726,7 +996,6 @@ "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, "dependencies": { "brace-expansion": "^1.1.7" }, @@ -734,11 +1003,58 @@ "node": "*" } }, + "node_modules/minipass": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/ms": { "version": "2.1.3", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" }, + "node_modules/node-addon-api": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-5.1.0.tgz", + "integrity": "sha512-eh0GgfEkpnoWDq+VY8OyvYhFEzBk6jIYbRKdIlyTiAXIVJ8PyBaKb0rp7oDtoddbdoHWhq8wwr+XZ81F1rpNdA==" + }, "node_modules/node-fetch": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", @@ -787,10 +1103,9 @@ } }, "node_modules/nopt": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", - "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", - "dev": true, + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", + "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", "dependencies": { "abbrev": "1" }, @@ -798,7 +1113,7 @@ "nopt": "bin/nopt.js" }, "engines": { - "node": "*" + "node": ">=6" } }, "node_modules/normalize-path": { @@ -810,6 +1125,17 @@ "node": ">=0.10.0" } }, + "node_modules/npmlog": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz", + "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==", + "dependencies": { + "are-we-there-yet": "^2.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^3.0.0", + "set-blocking": "^2.0.0" + } + }, "node_modules/oauth-sign": { "version": "0.9.0", "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", @@ -818,10 +1144,29 @@ "node": "*" } }, - "node_modules/opusscript": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/opusscript/-/opusscript-0.1.1.tgz", - "integrity": "sha512-mL0fZZOUnXdZ78woRXp18lApwpp0lF5tozJOD1Wut0dgrA9WuQTgSels/CSmFleaAZrJi/nci5KOVtbuxeWoQA==" + "node_modules/object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "engines": { + "node": ">=0.10.0" + } }, "node_modules/performance-now": { "version": "2.1.0", @@ -840,6 +1185,31 @@ "url": "https://github.com/sponsors/jonschlinkert" } }, + "node_modules/prism-media": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/prism-media/-/prism-media-1.3.5.tgz", + "integrity": "sha512-IQdl0Q01m4LrkN1EGIE9lphov5Hy7WWlH6ulf5QdGePLlPas9p2mhgddTEHrlaXYjjFToM1/rWuwF37VF4taaA==", + "peerDependencies": { + "@discordjs/opus": ">=0.8.0 <1.0.0", + "ffmpeg-static": "^5.0.2 || ^4.2.7 || ^3.0.0 || ^2.4.0", + "node-opus": "^0.3.3", + "opusscript": "^0.0.8" + }, + "peerDependenciesMeta": { + "@discordjs/opus": { + "optional": true + }, + "ffmpeg-static": { + "optional": true + }, + "node-opus": { + "optional": true + }, + "opusscript": { + "optional": true + } + } + }, "node_modules/psl": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", @@ -867,6 +1237,19 @@ "node": ">=0.6" } }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -910,6 +1293,20 @@ "node": ">= 6" } }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -943,7 +1340,6 @@ "version": "7.6.0", "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz", "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==", - "dev": true, "dependencies": { "lru-cache": "^6.0.0" }, @@ -954,6 +1350,16 @@ "node": ">=10" } }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==" + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==" + }, "node_modules/simple-update-notifier": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/simple-update-notifier/-/simple-update-notifier-2.0.0.tgz", @@ -999,6 +1405,38 @@ "node": ">=0.10.0" } }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -1011,6 +1449,22 @@ "node": ">=4" } }, + "node_modules/tar": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.0.tgz", + "integrity": "sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==", + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^5.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", @@ -1035,6 +1489,21 @@ "nodetouch": "bin/nodetouch.js" } }, + "node_modules/touch/node_modules/nopt": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", + "integrity": "sha512-NWmpvLSqUrgrAC9HCuxEvb+PSloHpqVu+FqcO4eeF2h5qYRhA7ev6KvelyQAKtegUbC6RypJnlEOhd8vloNKYg==", + "dev": true, + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": "*" + } + }, "node_modules/tough-cookie": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", @@ -1108,6 +1577,11 @@ "punycode": "^2.1.0" } }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" + }, "node_modules/uuid": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", @@ -1144,10 +1618,23 @@ "webidl-conversions": "^3.0.0" } }, + "node_modules/wide-align": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", + "dependencies": { + "string-width": "^1.0.2 || 2 || 3 || 4" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==" + }, "node_modules/ws": { - "version": "8.14.2", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.14.2.tgz", - "integrity": "sha512-wEBG1ftX4jcglPxgFCMJmZ2PLtSbJ2Peg6TmpJFTbe9GZYOQCDPdMYu/Tm0/bGZkw8paZnJY45J4K2PZrLYq8g==", + "version": "8.16.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.16.0.tgz", + "integrity": "sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==", "engines": { "node": ">=10.0.0" }, @@ -1167,8 +1654,7 @@ "node_modules/yallist": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/ytdl-core": { "version": "4.11.5", diff --git a/package.json b/package.json index 4187ef00..3636ba15 100644 --- a/package.json +++ b/package.json @@ -13,8 +13,9 @@ "license": "MIT", "dependencies": { "discord.js": "^14.14.1", + "@discordjs/voice": "^0.16.1", + "@discordjs/opus": "^0.9.0", "ms": "^2.1.3", - "opusscript": "0.1.1", "request": "^2.88.2", "simple-youtube-api": "^5.2.1", "ytdl-core": "^4.11.5"