mirror of
https://github.com/musix-org/musix-oss
synced 2025-07-07 04:20:49 +00:00
additional error logging and debugging.
This commit is contained in:
21
src/events/connectionEvents/handler.js
Normal file
21
src/events/connectionEvents/handler.js
Normal file
@ -0,0 +1,21 @@
|
||||
module.exports = function (client, connection) {
|
||||
connection.on("authenticated", () => {
|
||||
if (client.config.devMode) console.log("Voice connection initiated.");
|
||||
}).on("debug", (message) => {
|
||||
if (client.config.devMode) console.log(message);
|
||||
}).on("disconnect", () => {
|
||||
if (client.config.devMode) console.log("Voice connection disconnected.");
|
||||
}).on("error", (error) => {
|
||||
console.log(error);
|
||||
}).on("failed", (error) => {
|
||||
if (client.config.devMode) console.log(error);
|
||||
}).on("newSession", () => {
|
||||
if (client.config.devMode) console.log("New voice session id received!");
|
||||
}).on("ready", () => {
|
||||
if (client.config.devMode) console.log("Voice connection ready.");
|
||||
}).on("reconnecting", () => {
|
||||
if (client.config.devMode) console.log("Voice connection reconnecting.");
|
||||
}).on("warn", (warning) => {
|
||||
console.log(`Voice connection warning: ${warning}`);
|
||||
})
|
||||
}
|
Reference in New Issue
Block a user