-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Enhancement] Replaced single files events with only one file
- Loading branch information
Showing
4 changed files
with
40 additions
and
18 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
const { logger } = require("../modules/logger"); | ||
|
||
module.exports.playerEvents = (player) => { | ||
player.on("error", (queue, error) => { | ||
logger(`${queue.guild.name} An Error has occurred ${error}`, "error"); | ||
}); | ||
player.on("botDisconnect", (queue) => { | ||
logger(`${queue.guild.name} Disconnected from Channel`); | ||
}); | ||
player.on("channelEmpty", (queue) => { | ||
logger(`${queue.guild.name}: Voice channel is empty right now!`); | ||
}); | ||
player.on("connectionCreate", (queue, connection) => { | ||
logger( | ||
`${queue.guild.name}: Bot has successfully connected to Voice Channel!` | ||
); | ||
}); | ||
player.on("connectionError", (queue, error) => { | ||
logger( | ||
`${queue.guild.name}: There has been a connection error, ${error.message}` | ||
); | ||
}); | ||
player.on("queueEnd", (queue) => { | ||
logger(`${queue.guild.name}: Queue has finished playing!`); | ||
}); | ||
player.on("trackAdd", (queue, track) => { | ||
logger(`${queue.guild.name}: ${track.title} has been added!`); | ||
}); | ||
player.on("trackEnd", (queue, track) => { | ||
logger(`${queue.guild.name}: ${track.title} has finished playing!`); | ||
}); | ||
player.on("tracksAdd", (queue, tracks) => { | ||
logger( | ||
`${queue.guild.name}: A playlist with ${tracks.length} songs has beed added!` | ||
); | ||
}); | ||
player.on("trackStart", (queue, track) => { | ||
logger(`${queue.guild.name}: ${track.title} has started playing`); | ||
}); | ||
}; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.