Kiriox
Kiriox
DIAdiscord.js - Imagine an app
Created by Kiriox on 7/31/2024 in #djs-questions
Impossible to timeout members from GuildMembersManager object
Perfect thank you
8 replies
DIAdiscord.js - Imagine an app
Created by Kiriox on 7/31/2024 in #djs-questions
Impossible to timeout members from GuildMembersManager object
But this is not possible from guildmembersmanager?
8 replies
DIAdiscord.js - Imagine an app
Created by Kiriox on 7/31/2024 in #djs-questions
Impossible to timeout members from GuildMembersManager object
Oh, I read it wrong
8 replies
DIAdiscord.js - Imagine an app
Created by Kiriox on 7/22/2024 in #djs-questions
guildMemberRemove event don't work
Excuse me, typo
6 replies
DIAdiscord.js - Imagine an app
Created by Kiriox on 7/22/2024 in #djs-questions
guildMemberRemove event don't work
What did you mean by that?
6 replies
DIAdiscord.js - Imagine an app
Created by Kiriox on 7/22/2024 in #djs-questions
guildMemberRemove event don't work
How can I check for partial? And how can I make the member cached?
6 replies
DIAdiscord.js - Imagine an app
Created by Kiriox on 6/1/2024 in #djs-questions
Discord.js RPC Extension work ?
Thanks
4 replies
DIAdiscord.js - Imagine an app
Created by Kiriox on 10/15/2023 in #djs-voice
Recover audio and mute user
Ah it's good I succeeded thank you very much for your help
16 replies
DIAdiscord.js - Imagine an app
Created by Kiriox on 10/15/2023 in #djs-voice
Recover audio and mute user
Okay but how can I do it?
16 replies
DIAdiscord.js - Imagine an app
Created by Kiriox on 10/15/2023 in #djs-voice
Recover audio and mute user
Yes and no, it is the one given in the example but on the other hand Premature closed comes from the error itself
16 replies
DIAdiscord.js - Imagine an app
Created by Kiriox on 10/15/2023 in #djs-voice
Recover audio and mute user
@Qjuh Oh i lost the error message: ❌ Error recording file ./recordings/1697478736800.ogg - Premature close
16 replies
DIAdiscord.js - Imagine an app
Created by Kiriox on 10/15/2023 in #djs-voice
Recover audio and mute user
No description
16 replies
DIAdiscord.js - Imagine an app
Created by Kiriox on 10/15/2023 in #djs-voice
Recover audio and mute user
That was it thank you very much
16 replies
DIAdiscord.js - Imagine an app
Created by Kiriox on 10/15/2023 in #djs-voice
Recover audio and mute user
following this piece of code
function createListeningStream(receiver, userId) {
let opusStream = receiver.subscribe(userId, {
end: {
behavior: EndBehaviorType.AfterSilence,
duration: 1000,
},
});

let oggStream = new prism.opus.OggLogicalBitstream({
opusHead: new prism.opus.OpusHead({
channelCount: 2,
sampleRate: 48000,
}),
pageSizeControl: {
maxPackets: 10,
},
});

let filename = `./recordings/${Date.now()}.ogg`;

let out = createWriteStream(filename);

console.log(`👂 Started recording ${filename}`);

pipeline(opusStream, oggStream, out, (err) => {
if (err) {
console.warn(`❌ Error recording file ${filename} - ${err.message}`);
} else {
console.log(`✅ Recorded ${filename}`);
}
});
}
function createListeningStream(receiver, userId) {
let opusStream = receiver.subscribe(userId, {
end: {
behavior: EndBehaviorType.AfterSilence,
duration: 1000,
},
});

let oggStream = new prism.opus.OggLogicalBitstream({
opusHead: new prism.opus.OpusHead({
channelCount: 2,
sampleRate: 48000,
}),
pageSizeControl: {
maxPackets: 10,
},
});

let filename = `./recordings/${Date.now()}.ogg`;

let out = createWriteStream(filename);

console.log(`👂 Started recording ${filename}`);

pipeline(opusStream, oggStream, out, (err) => {
if (err) {
console.warn(`❌ Error recording file ${filename} - ${err.message}`);
} else {
console.log(`✅ Recorded ${filename}`);
}
});
}
16 replies
DIAdiscord.js - Imagine an app
Created by Kiriox on 10/15/2023 in #djs-voice
Recover audio and mute user
Finally I just copied the parts of the example that interests me except that I got this error
PS C:\Users\tomto\OneDrive\programation\bot discord\voice_bot> node .\index.js
Ready! Logged in as Roby#2109
C:\Users\tomto\OneDrive\programation\bot discord\voice_bot\index.js:55
opusHead: new prism.opus.OpusHead({
^

TypeError: prism.opus.OpusHead is not a constructor
at createListeningStream (C:\Users\tomto\OneDrive\programation\bot discord\voice_bot\index.js:55:13)
at VoiceConnection.<anonymous> (C:\Users\tomto\OneDrive\programation\bot discord\voice_bot\index.js:37:21)
at VoiceConnection.emit (node:events:513:28)
at set state [as state] (C:\Users\tomto\OneDrive\programation\bot discord\voice_bot\node_modules\@discordjs\voice\dist\index.js:1739:12)
at VoiceConnection.onNetworkingStateChange (C:\Users\tomto\OneDrive\programation\bot discord\voice_bot\node_modules\@discordjs\voice\dist\index.js:1881:18)
at Networking.emit (node:events:513:28)
at set state [as state] (C:\Users\tomto\OneDrive\programation\bot discord\voice_bot\node_modules\@discordjs\voice\dist\index.js:605:10)
at Networking.onWsPacket (C:\Users\tomto\OneDrive\programation\bot discord\voice_bot\node_modules\@discordjs\voice\dist\index.js:739:18)
at VoiceWebSocket.emit (node:events:525:35)
at VoiceWebSocket.onMessage (C:\Users\tomto\OneDrive\programation\bot discord\voice_bot\node_modules\@discordjs\voice\dist\index.js:462:10)

Node.js v18.16.0
PS C:\Users\tomto\OneDrive\programation\bot discord\voice_bot> node .\index.js
Ready! Logged in as Roby#2109
C:\Users\tomto\OneDrive\programation\bot discord\voice_bot\index.js:55
opusHead: new prism.opus.OpusHead({
^

TypeError: prism.opus.OpusHead is not a constructor
at createListeningStream (C:\Users\tomto\OneDrive\programation\bot discord\voice_bot\index.js:55:13)
at VoiceConnection.<anonymous> (C:\Users\tomto\OneDrive\programation\bot discord\voice_bot\index.js:37:21)
at VoiceConnection.emit (node:events:513:28)
at set state [as state] (C:\Users\tomto\OneDrive\programation\bot discord\voice_bot\node_modules\@discordjs\voice\dist\index.js:1739:12)
at VoiceConnection.onNetworkingStateChange (C:\Users\tomto\OneDrive\programation\bot discord\voice_bot\node_modules\@discordjs\voice\dist\index.js:1881:18)
at Networking.emit (node:events:513:28)
at set state [as state] (C:\Users\tomto\OneDrive\programation\bot discord\voice_bot\node_modules\@discordjs\voice\dist\index.js:605:10)
at Networking.onWsPacket (C:\Users\tomto\OneDrive\programation\bot discord\voice_bot\node_modules\@discordjs\voice\dist\index.js:739:18)
at VoiceWebSocket.emit (node:events:525:35)
at VoiceWebSocket.onMessage (C:\Users\tomto\OneDrive\programation\bot discord\voice_bot\node_modules\@discordjs\voice\dist\index.js:462:10)

Node.js v18.16.0
16 replies
DIAdiscord.js - Imagine an app
Created by Kiriox on 10/15/2023 in #djs-voice
Recover audio and mute user
Yes but I still wanted to test it so I did npm install as marked in the README and I get this error but I never wanted to import it as a package for my project
16 replies
DIAdiscord.js - Imagine an app
Created by Kiriox on 10/15/2023 in #djs-voice
Recover audio and mute user
ok thanks
> @discordjs/[email protected] postinstall
> is-ci || husky install

'is-ci' is not recognized as an internal command
or external, an executable program or batch file.
husky - Git hooks installed

up to date, audited 284 packages in 7s

83 packages are looking for funding
run `npm fund` for details

3 vulnerabilities (2 moderate, 1 high)

To address all issues, run:
npm audit fix

Run `npm audit` for details.
> @discordjs/[email protected] postinstall
> is-ci || husky install

'is-ci' is not recognized as an internal command
or external, an executable program or batch file.
husky - Git hooks installed

up to date, audited 284 packages in 7s

83 packages are looking for funding
run `npm fund` for details

3 vulnerabilities (2 moderate, 1 high)

To address all issues, run:
npm audit fix

Run `npm audit` for details.
16 replies
DIAdiscord.js - Imagine an app
Created by Kiriox on 10/15/2023 in #djs-voice
Recover audio and mute user
I didn't understand your request
16 replies
DIAdiscord.js - Imagine an app
Created by Kiriox on 10/15/2023 in #djs-voice
Recover audio and mute user
I would like to mute the person but only for the bot so that I only hear that person on the recording
16 replies
DIAdiscord.js - Imagine an app
Created by Kiriox on 10/15/2023 in #djs-voice
Recover audio and mute user
Yes I had seen that but I can't get it to work because of a package and it doesn't seem to me that they show how to mute a user
16 replies