YumeNeko
DIAdiscord.js - Imagine an app
•Created by YumeNeko on 2/26/2025 in #djs-questions
Cant find module config.json
now its fixed its from logging.js script
16 replies
DIAdiscord.js - Imagine an app
•Created by YumeNeko on 2/26/2025 in #djs-questions
Cant find module config.json

16 replies
DIAdiscord.js - Imagine an app
•Created by YumeNeko on 2/26/2025 in #djs-questions
Cant find module config.json

16 replies
DIAdiscord.js - Imagine an app
•Created by YumeNeko on 2/26/2025 in #djs-questions
Cant find module config.json
aaah in my logging.js script?
16 replies
DIAdiscord.js - Imagine an app
•Created by YumeNeko on 2/26/2025 in #djs-questions
Cant find module config.json
how to fix it?
16 replies
DIAdiscord.js - Imagine an app
•Created by YumeNeko on 2/26/2025 in #djs-questions
Cant find module config.json
yees
16 replies
DIAdiscord.js - Imagine an app
•Created by YumeNeko on 2/26/2025 in #djs-questions
Cant find module config.json
but my config json its in same folder
16 replies
DIAdiscord.js - Imagine an app
•Created by YumeNeko on 2/26/2025 in #djs-questions
Cant find module config.json

16 replies
DIAdiscord.js - Imagine an app
•Created by YumeNeko on 2/26/2025 in #djs-questions
Cant find module config.json
it is in same folder
16 replies
DIAdiscord.js - Imagine an app
•Created by YumeNeko on 2/26/2025 in #djs-questions
Cant find module config.json

16 replies
DIAdiscord.js - Imagine an app
•Created by YumeNeko on 2/26/2025 in #djs-questions
Cant find module config.json
logging.js
16 replies
DIAdiscord.js - Imagine an app
•Created by YumeNeko on 2/26/2025 in #djs-questions
Cant find module config.json
node:internal/modules/cjs/loader:1408
throw err;
^
Error: Cannot find module './config.json'
Require stack:
- C:\Users\Administrator\Documents\BloxAssist\src\clientlogin\commands\utility\logging.js
- C:\Users\Administrator\Documents\BloxAssist\src\clientlogin\deploy-commands.js at Function._resolveFilename (node:internal/modules/cjs/loader:1405:15)
at defaultResolveImpl (node:internal/modules/cjs/loader:1061:19) at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1066:22)
at Function._load (node:internal/modules/cjs/loader:1215:37) at TracingChannel.traceSync (node:diagnostics_channel:322:14) at wrapModuleLoad (node:internal/modules/cjs/loader:235:24) at Module.require (node:internal/modules/cjs/loader:1491:12) at require (node:internal/modules/helpers:135:16) at Object.<anonymous> (C:\Users\Administrator\Documents\BloxAssist\src\clientlogin\commands\utility\logging.js:9:16) at Module._compile (node:internal/modules/cjs/loader:1734:14) { code: 'MODULE_NOT_FOUND', requireStack: [ 'C:\Users\Administrator\Documents\BloxAssist\src\clientlogin\commands\utility\logging.js', 'C:\Users\Administrator\Documents\BloxAssist\src\clientlogin\deploy-commands.js' ] }
at defaultResolveImpl (node:internal/modules/cjs/loader:1061:19) at resolveForCJSWithHooks (node:internal/modules/cjs/loader:1066:22)
at Function._load (node:internal/modules/cjs/loader:1215:37) at TracingChannel.traceSync (node:diagnostics_channel:322:14) at wrapModuleLoad (node:internal/modules/cjs/loader:235:24) at Module.require (node:internal/modules/cjs/loader:1491:12) at require (node:internal/modules/helpers:135:16) at Object.<anonymous> (C:\Users\Administrator\Documents\BloxAssist\src\clientlogin\commands\utility\logging.js:9:16) at Module._compile (node:internal/modules/cjs/loader:1734:14) { code: 'MODULE_NOT_FOUND', requireStack: [ 'C:\Users\Administrator\Documents\BloxAssist\src\clientlogin\commands\utility\logging.js', 'C:\Users\Administrator\Documents\BloxAssist\src\clientlogin\deploy-commands.js' ] }
16 replies
DIAdiscord.js - Imagine an app
•Created by YumeNeko on 2/26/2025 in #djs-questions
DiscordAPIError[50001]: Missing Access
FINALLY ITS WORK
13 replies
DIAdiscord.js - Imagine an app
•Created by YumeNeko on 2/26/2025 in #djs-questions
DiscordAPIError[50001]: Missing Access
yes im pretty sure
13 replies
DIAdiscord.js - Imagine an app
•Created by YumeNeko on 2/26/2025 in #djs-questions
DiscordAPIError[50001]: Missing Access

13 replies
DIAdiscord.js - Imagine an app
•Created by YumeNeko on 2/26/2025 in #djs-questions
DiscordAPIError[50001]: Missing Access

13 replies
DIAdiscord.js - Imagine an app
•Created by YumeNeko on 2/26/2025 in #djs-questions
DiscordAPIError[50001]: Missing Access
I dont know why its still same
13 replies
DIAdiscord.js - Imagine an app
•Created by YumeNeko on 2/26/2025 in #djs-questions
DiscordAPIError[50001]: Missing Access

13 replies
DIAdiscord.js - Imagine an app
•Created by YumeNeko on 2/26/2025 in #djs-questions
DiscordAPIError[50001]: Missing Access
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 = []; // Grab all the command folders from the commands directory you created earlier 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.
); // The put method is used to fully refresh all commands in the guild with the current set const data = await rest.put( Routes.applicationGuildCommands(clientId, guildId), { body: commands }, ); console.log(Successfully reloaded ${data.length} application (/) commands.
); } catch (error) { // And of course, make sure you catch and log any errors! console.error(error); } })();
13 replies