Hacker249
Hacker249
DIAdiscord.js - Imagine an app
Created by Hacker249 on 5/16/2024 in #djs-questions
Bot not responding
Ye I need to fr
46 replies
DIAdiscord.js - Imagine an app
Created by Hacker249 on 5/16/2024 in #djs-questions
Bot not responding
So can you tell me where I am importing client the 2nd time?
46 replies
DIAdiscord.js - Imagine an app
Created by Hacker249 on 5/16/2024 in #djs-questions
Bot not responding
Ok
46 replies
DIAdiscord.js - Imagine an app
Created by Hacker249 on 5/16/2024 in #djs-questions
Bot not responding
Yup
46 replies
DIAdiscord.js - Imagine an app
Created by Hacker249 on 5/16/2024 in #djs-questions
Bot not responding
Made pdf
46 replies
DIAdiscord.js - Imagine an app
Created by Hacker249 on 5/16/2024 in #djs-questions
Bot not responding
46 replies
DIAdiscord.js - Imagine an app
Created by Hacker249 on 5/16/2024 in #djs-questions
Bot not responding
Oh ye
46 replies
DIAdiscord.js - Imagine an app
Created by Hacker249 on 5/16/2024 in #djs-questions
Bot not responding
But I'll ss
46 replies
DIAdiscord.js - Imagine an app
Created by Hacker249 on 5/16/2024 in #djs-questions
Bot not responding
Well I can't send msg cause nitro purposes
46 replies
DIAdiscord.js - Imagine an app
Created by Hacker249 on 5/16/2024 in #djs-questions
Bot not responding
Defined token as token for security reasons ofc
46 replies
DIAdiscord.js - Imagine an app
Created by Hacker249 on 5/16/2024 in #djs-questions
Bot not responding
{ "token": "token", "clientId": "1224494065710530702", "guildId": "995436307507593216" } const { REST, Routes } = require('discord.js'); const { clientId, guildId, token } = require('./config.json'); 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) { // Grab all the command files from the commands directory you created earlier const commandsPath = path.join(foldersPath, folder); const commandFiles = fs.readdirSync(commandsPath).filter(file => file.endsWith('.js')); // Grab the SlashCommandBuilder#toJSON() output of each command's data for deployment for (const file of commandFiles) { const filePath = path.join(commandsPath, file); const command = require(filePath); if ('data' in command && 'execute' in command) { commands.push(command.data.toJSON()); } else { console.log([WARNING] The command at ${filePath} is missing a required "data" or "execute" property.); } } } // Construct and prepare an instance of the REST module const rest = new REST().setToken(token); // and deploy your commands! (async () => { try { console.log(Started refreshing ${commands.length} application (/) commands.); const data = await rest.put( Routes.applicationGuildCommands(clientId, guildId), { body: commands }, ); console.log(Successfully reloaded ${data.length} application (/) commands.); } catch (error) { console.error(error); } })();
46 replies
DIAdiscord.js - Imagine an app
Created by Hacker249 on 5/16/2024 in #djs-questions
Bot not responding
Oh k
46 replies
DIAdiscord.js - Imagine an app
Created by Hacker249 on 5/16/2024 in #djs-questions
Bot not responding
Here's the error I'm encountering
46 replies
DIAdiscord.js - Imagine an app
Created by Hacker249 on 5/16/2024 in #djs-questions
Bot not responding
No description
46 replies
DIAdiscord.js - Imagine an app
Created by Hacker249 on 5/16/2024 in #djs-questions
Bot not responding
I'll send ss
46 replies
DIAdiscord.js - Imagine an app
Created by Hacker249 on 5/16/2024 in #djs-questions
Bot not responding
Deploy-commands.js code?
46 replies
DIAdiscord.js - Imagine an app
Created by Hacker249 on 5/16/2024 in #djs-questions
Bot not responding
I'm getting a syntax error stating that Clients is already defined. Do you know how to fix this issue
46 replies
DIAdiscord.js - Imagine an app
Created by Hacker249 on 5/16/2024 in #djs-questions
Bot not responding
Thank you very much
46 replies
DIAdiscord.js - Imagine an app
Created by Hacker249 on 5/16/2024 in #djs-questions
Bot not responding
Oh
46 replies
DIAdiscord.js - Imagine an app
Created by Hacker249 on 5/16/2024 in #djs-questions
Bot not responding
I will start to implement the use of slash commands to make it easier. Got any suggestions on who I should follow?
46 replies