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 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "dayzr-bot", "name": "dayzr-bot",
"version": "9.7.0", "version": "9.7.1",
"description": "A General Purpose Discord Bot for DayZ Nitrado Servers.", "description": "A General Purpose Discord Bot for DayZ Nitrado Servers.",
"main": "index.js", "main": "index.js",
"nodemonConfig": { "nodemonConfig": {
+1 -2
View File
@@ -19,7 +19,7 @@ module.exports = {
for (const file of commandFiles) { for (const file of commandFiles) {
const command = require(`../commands/${file}`); 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); const rest = new REST({ version: '10' }).setToken(client.config.Token);
@@ -43,7 +43,6 @@ module.exports = {
const commands = []; const commands = [];
const commandFiles = fs.readdirSync(path.join(__dirname, "..", "commands")).filter(file => file.endsWith('.js')); 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; const clientId = client.application.id;
for (const file of commandFiles) { for (const file of commandFiles) {