Initial commit of karuta-starboard bot

This commit is contained in:
UltraLionFr
2025-07-19 05:01:14 +02:00
commit 85800e3c8f
13 changed files with 371 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
const { REST, Routes } = require('discord.js');
const fs = require('fs');
require('dotenv').config();
const commands = [];
const commandFiles = fs.readdirSync('./SlashCommands').filter(file => file.endsWith('.js'));
for (const file of commandFiles) {
const command = require(`./SlashCommands/${file}`);
commands.push(command.data.toJSON());
}
const rest = new REST({ version: '10' }).setToken(process.env.TOKEN);
(async () => {
try {
console.log('⏳ Deploying slash commands...');
await rest.put(Routes.applicationCommands(process.env.CLIENT_ID), { body: commands });
console.log('✅ Commands deployed successfully.');
} catch (error) {
console.error(error);
}
})();