ǝoſ
ǝoſ
DIAdiscord.js - Imagine an app
Created by ǝoſ on 8/14/2024 in #djs-voice
Is this the correct way for the bot to clear cache
if (connection) {
connection.destroy();

const cachedConnection = client.voice.adapters.get(interaction.guild.id);
if (cachedConnection) {
cachedConnection.destroy();
}
if (connection) {
connection.destroy();

const cachedConnection = client.voice.adapters.get(interaction.guild.id);
if (cachedConnection) {
cachedConnection.destroy();
}
2 replies