Async
Async
Explore posts from servers
DIAdiscord.js - Imagine an app
Created by Async on 2/11/2025 in #djs-questions
Bot backend suggestions
in my specific case nobloxjs connections
8 replies
DIAdiscord.js - Imagine an app
Created by Async on 2/11/2025 in #djs-questions
Bot backend suggestions
db connections
8 replies
DIAdiscord.js - Imagine an app
Created by Async on 2/11/2025 in #djs-questions
Bot backend suggestions
event handling
8 replies
DIAdiscord.js - Imagine an app
Created by Async on 2/11/2025 in #djs-questions
Bot backend suggestions
command handling
8 replies
DIAdiscord.js - Imagine an app
Created by Async on 2/11/2025 in #djs-questions
Bot backend suggestions
when you run a script to start ur bot, essentially what happens there
8 replies
DIAdiscord.js - Imagine an app
Created by Async on 2/11/2025 in #djs-questions
Bot backend suggestions
meant like
8 replies
DIAdiscord.js - Imagine an app
Created by Async on 4/26/2024 in #djs-questions
Command handler change
Do I just put the slashcommandbuilder in deploy-commands instead and just have the subcommands be formatted as JSON (removing the .toJSON() when pushing subcommands)
30 replies
DIAdiscord.js - Imagine an app
Created by Async on 4/26/2024 in #djs-questions
Command handler change
How would I "handle" it if it is a directory
30 replies
DIAdiscord.js - Imagine an app
Created by Time on 5/3/2024 in #djs-questions
application did not respond
unless you're doing that in your command's file, and if so that's outside the scope of my knowledge capacity atm
16 replies
DIAdiscord.js - Imagine an app
Created by Time on 5/3/2024 in #djs-questions
application did not respond
i mean... yeah.. you're doing deferReply() but aren't resolving that in any way
16 replies
DIAdiscord.js - Imagine an app
Created by Time on 5/3/2024 in #djs-questions
application did not respond
where is the first bit of code located
16 replies
DIAdiscord.js - Imagine an app
Created by Async on 4/26/2024 in #djs-questions
Command handler change
right, but how can i make it recognize the folder as a "command", and what should I put inside of the data field in module.exports for the subcommands?
30 replies
DIAdiscord.js - Imagine an app
Created by Async on 4/26/2024 in #djs-questions
Command handler change
So something like this?
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);

// Grab the SlashCommandBuilder#toJSON() output of each command's data for deployment
for (const file of commandFiles) {
const filePath = path.join(commandsPath, file);
const commandFiles = fs.statSync(filePath);
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.`);
}
}
}
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);

// Grab the SlashCommandBuilder#toJSON() output of each command's data for deployment
for (const file of commandFiles) {
const filePath = path.join(commandsPath, file);
const commandFiles = fs.statSync(filePath);
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.`);
}
}
}
30 replies
DIAdiscord.js - Imagine an app
Created by Async on 4/26/2024 in #djs-questions
Command handler change
oh do you want me to have both fs.readdirSync and fs.statSync in the same loop?
30 replies
DIAdiscord.js - Imagine an app
Created by Async on 4/26/2024 in #djs-questions
Command handler change
30 replies
DIAdiscord.js - Imagine an app
Created by Async on 4/26/2024 in #djs-questions
Command handler change
yes but then the other for loop errors
30 replies
DIAdiscord.js - Imagine an app
Created by Async on 4/26/2024 in #djs-questions
Command handler change
Like, unless I change it from
const commandFiles = fs.readdirSync(commandsPath);
const commandFiles = fs.readdirSync(commandsPath);
to
const commandFiles = fs.statSync(commandsPath);
const commandFiles = fs.statSync(commandsPath);
I can't do it, but if I do this, will it change anything?
30 replies
DIAdiscord.js - Imagine an app
Created by Async on 4/26/2024 in #djs-questions
Command handler change
or none that i can see at least
30 replies