Création Repo pour mon bot Le Tamiseur

This commit is contained in:
Zachary Guénot
2023-04-23 19:30:04 +02:00
commit a879b38c3e
50 changed files with 7159 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
module.exports = {
name: 'audioTrackAdd',
async execute(queue, track) {
// Emitted when the player adds a single song to its queue
queue.metadata.channel.send(`Musique **${track.title}** de **${track.author}** ajoutée à la file d'attente !`)
}
}

View File

@@ -0,0 +1,7 @@
module.exports = {
name: 'audioTracksAdd',
async execute(queue, track) {
// Emitted when the player adds multiple songs to its queue
queue.metadata.channel.send(`Ajout de ${track.length} musiques à la file d'attente !`)
}
}

8
eventsPlayer/debug.js Normal file
View File

@@ -0,0 +1,8 @@
module.exports = {
name: 'debug',
async execute (queue, message) {
// Emitted when the player queue sends debug info
// Useful for seeing what state the current queue is at
console.log(`Player debug event: ${message}`)
}
}

View File

@@ -0,0 +1,7 @@
module.exports = {
name: 'disconnect',
async execute(queue, track) {
// Emitted when the bot leaves the voice channel
queue.metadata.channel.send("J'ai quitté le vocal !")
}
}

View File

@@ -0,0 +1,8 @@
module.exports = {
name: 'emptyChannel',
async execute(queue, track) {
// Emitted when the voice channel has been empty for the set threshold
// Bot will automatically leave the voice channel with this event
queue.metadata.channel.send(`Je quitte le vocal car il est vide depuis trop longtemps.`)
}
}

View File

@@ -0,0 +1,7 @@
module.exports = {
name: 'emptyQueue',
async execute(queue, track) {
// Emitted when the player queue has finished
queue.metadata.channel.send("File d'attente vide !")
}
}

8
eventsPlayer/error.js Normal file
View File

@@ -0,0 +1,8 @@
module.exports = {
name: 'error',
async execute(queue, error) {
// Emitted when the player queue encounters error
console.log(`\u001b[1;31m General player error event: ${error.message}`)
console.error(error)
}
}

View File

@@ -0,0 +1,8 @@
module.exports = {
name: 'playerError',
async execute(queue, error) {
// Emitted when the audio player errors while streaming audio track
console.log(`\u001b[1;31m Player error event: ${error.message}`)
console.error(error)
}
}

View File

@@ -0,0 +1,7 @@
module.exports = {
name: 'playerSkip',
async execute(queue, track) {
// Emitted when the audio player fails to load the stream for a song
queue.metadata.channel.send(`Musique **${track.title}** de **${track.author}** passée !`)
}
}

View File

@@ -0,0 +1,7 @@
module.exports = {
name: 'playerStart',
async execute(queue, track) {
// Emitted when the player starts to play a song
queue.metadata.channel.send(`Lecture de **${track.title}** de **${track.author}** !`)
}
}