fix/duplicated global commands in issue #8

This commit is contained in:
SowinskiBraeden committed 2023-09-04 20:44:44 -07:00
1 parent 1ff3a25037
commit 174340b178
2 files changed
+2 -3

No files matched your search

+1 -2
View File
@@ -19,7 +19,7 @@ module.exports = {
for (const file of commandFiles) {
const command = require(`../commands/${file}`);
if (!commands.global) commands.push(command); // don't include global commands
if (!command.global) commands.push(command); // don't include global commands
}
const rest = new REST({ version: '10' }).setToken(client.config.Token);
@@ -43,7 +43,6 @@ module.exports = {
const commands = [];
const commandFiles = fs.readdirSync(path.join(__dirname, "..", "commands")).filter(file => file.endsWith('.js'));
// Place your client and guild ids here
const clientId = client.application.id;
for (const file of commandFiles) {