You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 12, 2023. It is now read-only.
I made a music bot
for the first month it played very well,
but after about 3 months it becomes laggy
even though i run it locally
Code sample
asyncexecute(){if(!this.message.member?.voice?.channel){this.message.channel.send('You Need To Join Voice Channel :microphone:')return;}else{constadapter=this.message?.guild?.voiceAdapterCreatorasunknown;this.server.channel=joinVoiceChannel({channelId : this.message.member.voice.channelId??'',guildId : this.message.guildId??'',adapterCreator : adapterasDiscordGatewayAdapterCreator});}letfilterQueue: Song[]=this.server.queue.filter((x: Song)=>x.status===MusicStatus.Unplayed);if(filterQueue.length>0){this.server.status='active';this.server.player=createAudioPlayer();constsong=awaitplayDl.stream(filterQueue[0].url);constaudioResource=createAudioResource(song.stream,{inputType : song.type})this.server.player.play(audioResource);this.server.channel.subscribe(this.server.player);filterQueue[0].status=MusicStatus.Playing;// filterQueue[1].status = MusicStatus.Next;this.server.player.on(AudioPlayerStatus.Idle,async()=>{filterQueue[0].status=MusicStatus.Done;awaitthis.execute();return;})this.message.channel.send(`Now Playing ${filterQueue[0].name} :musical_note:`);}else{this.message.channel.send(`Queue Is Empty, I Will Leave Voice Channel If Theres No Activity, :hand_splayed:`);this.server.status='inactive';}this.server.timeStamp=newDate();}
@discordjs/voice version
0.6.0
Node.js version
16.11.1
Operating system
Windows
Priority this issue should have
Low (slightly annoying)
The text was updated successfully, but these errors were encountered:
Issue description
I made a music bot
for the first month it played very well,
but after about 3 months it becomes laggy
even though i run it locally
Code sample
@discordjs/voice version
0.6.0
Node.js version
16.11.1
Operating system
Windows
Priority this issue should have
Low (slightly annoying)
The text was updated successfully, but these errors were encountered: