forked from snxraven/LinkUp-P2P-Chat
Fixed my bots messages
This commit is contained in:
parent
70655ce901
commit
52a319a1c0
@ -19,14 +19,14 @@ async function loadCommands() {
|
|||||||
for (const file of files) {
|
for (const file of files) {
|
||||||
// Check if the file is a JavaScript file
|
// Check if the file is a JavaScript file
|
||||||
if (file.endsWith('.js')) {
|
if (file.endsWith('.js')) {
|
||||||
// const commandName = path.basename(file, '.js');
|
const commandName = path.basename(file, '.js');
|
||||||
const commandPath = path.join(commandsDir, file);
|
const commandPath = path.join(commandsDir, file);
|
||||||
|
|
||||||
// Dynamically import the command module
|
// Dynamically import the command module
|
||||||
const { default: commandModule } = await import(commandPath);
|
const { default: commandModule } = await import(commandPath);
|
||||||
|
|
||||||
// Add the command module to the commands object
|
// Add the command module to the commands object
|
||||||
commands[commandPath] = commandModule;
|
commands[commandName] = commandModule;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user