summaryrefslogtreecommitdiff
path: root/src/bot.js
diff options
context:
space:
mode:
authorAleksa Vuckovic <aleksa@vuckovic.cc>2026-06-10 21:54:08 +0200
committerAleksa Vuckovic <aleksa@vuckovic.cc>2026-06-10 21:54:08 +0200
commite2b7bc8236ac90eddf4827376b95a6e4ed44715c (patch)
tree95019995ffc6b87ddb55f3c7d8ed06cfcb116d21 /src/bot.js
parentdd8897294f0c070948b34214defcb436c70005a3 (diff)
Log voice-related debug and raw VOICE_*_UPDATE packets
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Diffstat (limited to 'src/bot.js')
-rw-r--r--src/bot.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/bot.js b/src/bot.js
index 3ec9aa1..21eadf5 100644
--- a/src/bot.js
+++ b/src/bot.js
@@ -110,4 +110,16 @@ client.on('warn', (info) => {
console.warn(`[WARN] ${new Date().toISOString()} - ${info}`);
});
+client.on('debug', (info) => {
+ if (info.includes('VOICE') || info.includes('Voice') || info.includes('voice')) {
+ console.log(`[DJS DEBUG] ${info}`);
+ }
+});
+
+client.on('raw', (packet) => {
+ if (packet.t === 'VOICE_STATE_UPDATE' || packet.t === 'VOICE_SERVER_UPDATE') {
+ console.log(`[RAW ${packet.t}]`, JSON.stringify(packet.d));
+ }
+});
+
client.login(process.env.DISCORD_TOKEN); \ No newline at end of file