Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

discord.js v13 ending play after

const {
	AudioPlayerStatus,
	StreamType,
	createAudioPlayer,
	createAudioResource,
	joinVoiceChannel,
	getVoiceConnection,
} = require('@discordjs/voice');

const stream = ytdl(song.url, { filter: 'audioonly' });
const resource = createAudioResource(stream, { inputType: StreamType.Arbitrary });
player.play(resource);

// here <3
player.on(AudioPlayerStatus.Idle, () => {
			song_queue.songs.shift();
			video_player(guild, song_queue.songs[0],player,interaction);
		});
// here <3
Source by github.com #
 
PREVIOUS NEXT
Tagged: #play
ADD COMMENT
Topic
Name
2+1 =