#thread

1 messages · Page 1 of 1 (latest)

torn moss
#

const fs = require('fs');
const { REST } = require('@discordjs/rest');
const { Routes } = require('discord-api-types/v9');
const { clientId, guildId, token } = require('./config.json');

const commands = [];
const commandFiles = fs.readdirSync('./commands').filter(file => file.endsWith('.js'));

for (const file of commandFiles) {
const command = require(./commands/${file});
commands.push(command.data.toJSON());
}

flat saffron
#

ok

#

so

flat saffron
#

and go to

#

newPlayer.js

#

send me the first 10 lines

torn moss
#

const { SlashCommandBuilder } = require('@discordjs/builders');

module.exports = {
data: new SlashCommandBuilder()
.setName('newPlayer')
.setDescription('Add a new player to the bot.')
.addStringOption(option =>
option.setName('category')
.setDescription('The gif category')
.setRequired(true)
.addChoice('Funny', 'gif_funny')

flat saffron
#

ok wait

torn moss
#

module.exports = {
    data: new SlashCommandBuilder()
        .setName('newPlayer')
        .setDescription('Add a new player to the bot.')
        .addStringOption(option =>
            option.setName('category')
                .setDescription('The gif category')
                .setRequired(true)
                .addChoice('Funny', 'gif_funny')```
#

ah ok

#

this is the error

flat saffron
#

1sec

#

k wait

flat saffron
#

instead of newPlayer

torn moss
#

alright

#

JESUS CHRIST THAT WAS IT

#

TYSM

#

you are amazing thank you

flat saffron