Velenosoh
Velenosoh
DIAdiscord.js - Imagine an app
Created by Velenosoh on 4/11/2024 in #djs-questions
Register Global Command
Hi, I found a person with whom I was able to consult and he advised me to keep the bot off for 2 days as perhaps loop intervals or other things of the sort were created by not allowing me to record the commands correctly. We have done some testing and the code records all commands on other applications. In essence, continuing to modify the code no longer makes sense since this shows that the problem is not the code but the application
101 replies
DIAdiscord.js - Imagine an app
Created by Velenosoh on 4/11/2024 in #djs-questions
Register Global Command
Oh and how do I register them after this code?
101 replies
DIAdiscord.js - Imagine an app
Created by Velenosoh on 4/11/2024 in #djs-questions
Register Global Command
does this code alone record commands or should I add it to my commandLoader.js?
101 replies
DIAdiscord.js - Imagine an app
Created by Velenosoh on 4/11/2024 in #djs-questions
Register Global Command
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); // Set a new item in the Collection with the key as the command name and the value as the exported module if ('data' in command && 'execute' in command) { client.commands.set(command.data.name, command); } else { console.log([WARNING] The command at ${filePath} is missing a required "data" or "execute" property.); } } }
101 replies
DIAdiscord.js - Imagine an app
Created by Velenosoh on 4/11/2024 in #djs-questions
Register Global Command
Ok
101 replies
DIAdiscord.js - Imagine an app
Created by Velenosoh on 4/11/2024 in #djs-questions
Register Global Command
What exactly should I copy?
101 replies
DIAdiscord.js - Imagine an app
Created by Velenosoh on 4/11/2024 in #djs-questions
Register Global Command
I do it so I recover each folder and filter within each .js file to put in the globalCommands array
101 replies
DIAdiscord.js - Imagine an app
Created by Velenosoh on 4/11/2024 in #djs-questions
Register Global Command
So i change the version 9 to 10?
101 replies
DIAdiscord.js - Imagine an app
Created by Velenosoh on 4/11/2024 in #djs-questions
Register Global Command
No
101 replies
DIAdiscord.js - Imagine an app
Created by Velenosoh on 4/11/2024 in #djs-questions
Register Global Command
this is the commandLoader.js
101 replies
DIAdiscord.js - Imagine an app
Created by Velenosoh on 4/11/2024 in #djs-questions
Register Global Command
101 replies
DIAdiscord.js - Imagine an app
Created by Velenosoh on 4/11/2024 in #djs-questions
Register Global Command
Ok
101 replies
DIAdiscord.js - Imagine an app
Created by Velenosoh on 4/11/2024 in #djs-questions
Register Global Command
However, I am sure that the code and its logic are correct because if I change the token and clientId of another application the commands are recorded
101 replies
DIAdiscord.js - Imagine an app
Created by Velenosoh on 4/11/2024 in #djs-questions
Register Global Command
The commands simply don't load without giving me any errors
101 replies
DIAdiscord.js - Imagine an app
Created by Velenosoh on 4/11/2024 in #djs-questions
Register Global Command
I still can't record the commands I don't know what to try anymore I've done everything
101 replies
DIAdiscord.js - Imagine an app
Created by Velenosoh on 4/11/2024 in #djs-questions
Register Global Command
resolved
101 replies
DIAdiscord.js - Imagine an app
Created by Velenosoh on 4/11/2024 in #djs-questions
Register Global Command
I have a question, if my bot is in one server and his role hasn’t the administrator permission can this give me problem during the register of global commands?
101 replies
DIAdiscord.js - Imagine an app
Created by Velenosoh on 4/11/2024 in #djs-questions
Register Global Command
Can we continue today?
101 replies
DIAdiscord.js - Imagine an app
Created by Velenosoh on 4/11/2024 in #djs-questions
Register Global Command
Okok i just delete the lib
101 replies
DIAdiscord.js - Imagine an app
Created by Velenosoh on 4/11/2024 in #djs-questions
Register Global Command
ehy?
101 replies