mirror of
https://github.com/warengroup/eximiabots-radiox.git
synced 2025-07-01 11:43:38 +00:00
Moved commands map to commands.js
This commit is contained in:
@ -6,11 +6,14 @@ const path = require ('path');
|
||||
|
||||
module.exports = {
|
||||
async execute(client) {
|
||||
|
||||
const commands = [];
|
||||
const commandFiles = fs.readdirSync(path.join("./src/client/commands")).filter(f => f.endsWith(".js"));
|
||||
|
||||
for (const file of commandFiles) {
|
||||
const command = require(`./commands/${file}`);
|
||||
client.commands.set(command.name, command);
|
||||
|
||||
command.data = new SlashCommandBuilder()
|
||||
.setName(command.name)
|
||||
.setDescription(command.description);
|
||||
|
Reference in New Issue
Block a user