Jordy
Jordy
DIAdiscord.js - Imagine an app
Created by Jordy on 6/27/2024 in #djs-questions
Ehm?
un 27 03:42:06 v4069 node[516716]: Possible AsyncEventEmitter memory leak detected. 11 error listeners added to WebSocketShard. Use emitter.setMaxListeners() to increase the limit. Jun 27 03:43:06 v4069 node[516716]: Possible AsyncEventEmitter memory leak detected. 11 ready listeners added to WebSocketShard. Use emitter.setMaxListeners() to increase the limit. Jun 27 05:39:33 v4069 node[516716]: /opt/Syntrix/node_modules/ws/lib/websocket.js:444 Jun 27 05:39:33 v4069 node[516716]: throw new Error('WebSocket is not open: readyState 0 (CONNECTING)'); Jun 27 05:39:33 v4069 node[516716]: ^ Jun 27 05:39:33 v4069 node[516716]: Error: WebSocket is not open: readyState 0 (CONNECTING) Jun 27 05:39:33 v4069 node[516716]: at WebSocket.send (/opt/Syntrix/node_modules/ws/lib/websocket.js:444:13) Jun 27 05:39:33 v4069 node[516716]: at WebSocketShard.send (/opt/Syntrix/node_modules/@discordjs/ws/dist/index.js:813:21) Jun 27 05:39:33 v4069 node[516716]: at runNextTicks (node:internal/process/task_queues:60:5) Jun 27 05:39:33 v4069 node[516716]: at process.process
28 replies
DIAdiscord.js - Imagine an app
Created by Jordy on 6/6/2024 in #djs-questions
embed color
Is it possible to make the embed border color invisible?
4 replies
DIAdiscord.js - Imagine an app
Created by Jordy on 4/12/2024 in #djs-voice
Allowed sources to play
Playing music from youtube is not allowed according to TOS. Thats fair and valid in my opinion. Now my question is, what are the allowed sources or is everything like soundcloud spotify ect not allowed ? (Just curious, dont wanna break TOS) Thanks in advance
11 replies
DIAdiscord.js - Imagine an app
Created by Jordy on 4/11/2024 in #djs-questions
Command handler, loading commands in
const { Routes } = require('discord.js');
module.exports = (client) => {
client.commandHandler = async () => {
const fs = require('node:fs');
const path = require('node:path');
const commands = [];
const foldersPath = path.join(__dirname, '../commands');
const commandFolders = fs.readdirSync(foldersPath);

for (const folder of commandFolders) {
const commandsPath = path.join(foldersPath, folder);
const commandFiles = fs.readdirSync(commandsPath).filter(file => file.endsWith('.js'));
for (const file of commandFiles) {
const filePath = path.join(commandsPath, file);
const command = require(filePath);
if ('data' in command && 'execute' in command) {
console.log(`${file} is loaded`)
commands.push(command.data.toJSON());
} else {
console.log(`[WARNING] The command at ${filePath} is missing a required "data" or "execute" property.`);
}
}
}
};
};
const { Routes } = require('discord.js');
module.exports = (client) => {
client.commandHandler = async () => {
const fs = require('node:fs');
const path = require('node:path');
const commands = [];
const foldersPath = path.join(__dirname, '../commands');
const commandFolders = fs.readdirSync(foldersPath);

for (const folder of commandFolders) {
const commandsPath = path.join(foldersPath, folder);
const commandFiles = fs.readdirSync(commandsPath).filter(file => file.endsWith('.js'));
for (const file of commandFiles) {
const filePath = path.join(commandsPath, file);
const command = require(filePath);
if ('data' in command && 'execute' in command) {
console.log(`${file} is loaded`)
commands.push(command.data.toJSON());
} else {
console.log(`[WARNING] The command at ${filePath} is missing a required "data" or "execute" property.`);
}
}
}
};
};
SO i just changed my slash command push to a file that i can run once i make updates, now my commands have stopped working, the right file paths are being called. Am i doing something that wrong?
3 replies