#slash command variable export
7 messages · Page 1 of 1 (latest)
I do but same thing happened
How are you importing it in the other file?
Like this
fileOne.js
module.exports = {
// ...
async execute(interaction) {
const { guild } = interaction;
module.exports.userMain = interaction.user.id;
// ...
},
userMain: null
};
fileTwo.js
const { userMain } = require("./fileOne.js");
Ohh
It's work.T hank bro
That’s prone to race conditions so bad… you basically assume that only one person at a time will use that command