secretbox.methods.close is not a function
Closed this issue · 4 comments
Probabilities commented
Which package has the bugs?
The core library
Issue description
Just run the code and it will throw the error.
Code sample
const { Client } = require('discord.js-selfbot-v13');
const client = new Client();
const fs = require('fs');
const ytdl = require('@distube/ytdl-core');
client.on('ready', async () => {
console.log(`${client.user.username} is ready!`);
const channel = client.channels.cache.get('x');
const connection = await client.voice.joinChannel(channel)
connection.playAudio(
ytdl('https://www.youtube.com/watch?v=3KadWjpqDXs', {
quality: 'highestaudio',
}),
)
})
client.login('x.GfFMbv.x-k9MN9PlI');
Package version
3.3.0
Node.js version
18.0.0
Operating system
Windows 10
Priority this issue should have
High (immediate attention needed)
Checklist
- I have searched the open issues for duplicates.
- I have shared the entire traceback.
- I am using a user token (and it isn't visible in the code).
Additional Information
No response
aiko-chan-ai commented
Probabilities commented
how do I fix?
xvyx commented
as she said, do npm i tweetnacl
(it worked for me)
aiko-chan-ai commented
Because Discord has made some updates to the RTP header in the payload, it means that tweetnacl no longer works. Use sodium or libsodium-wrappers as a replacement.