Replies: 1 comment
-
their code for anyone that is going to help ( it's almost 2am here and I have work in a couple hours ) import { VoiceRecorder } from "@kirdock/discordjs-voice-recorder"
import { Client } from "discord.js-selfbot-v13"
import { joinVoiceChannel } from "@discordjs/voice"
import { readFile } from "fs/promises"
import { createWriteStream } from "fs"
function content(path) {
return readFile(path, 'utf-8')
}
const client = new Client({
patchVoice: true
})
const tok = await content("token.txt")
const channelID = await content("channelID.txt")
client.on('ready', async () => {
const vrc = new VoiceRecorder(client)
const connection = joinVoiceChannel({
guildId: channelID,
channelId: channelID,
adapterCreator: (await client.channels.fetch(channelID)).voiceAdapterCreator,
selfDeaf: false,
selfMute: true,
})
vrc.startRecording(connection)
await vrc.getRecordedVoice(
createWriteStream('recorded_session.mp3'),
channelID,
'single',
1
)
})
client.login(tok) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I have tried to record a group call with https://github.com/Kirdock/discordjs-voice-recorder/ but it seem that it does not want to join unless I restart the call after I turn on the bot, I have made a discussion there Kirdock/discordjs-voice-recorder#3 (comment) , but I don't think it has something to do with his library.
I tried to put a delay like he said , and it works like it outputs an audio file after the specified amount of time but it's empty and the selfbot does not join the call when started only if I restart the call.
Anyone know a fix for this or I am doing smth in the wrong way?
Beta Was this translation helpful? Give feedback.
All reactions