#How i can import JSON file in this case?

3 messages · Page 1 of 1 (latest)

toxic talon

I tried to use const EnrollmentState = require('.../Data/EnrollmentState.json') but this don' work.

const { SlashCommandBuilder } = require('discord.js');
const EnrollmentState = require('.../Data/EnrollmentState.json')
module.exports = {
  data: new SlashCommandBuilder()
          .setName('rekrutacja')
          .setDescription('Zmień status rekrutacji dla wybranej platformy'),
          
  run: ({ interaction, client, handler }) => {
    interaction.reply(EnrollmentState.mta);
  },
};
gentle oysterBOT
  • Consider reading #how-to-get-help to improve your question!
  • Explain what exactly your issue is.
  • Post the full error stack trace, not just the top part!
  • Show your code!
  • Issue solved? Press the button!
native summit

going back directory is ../../ not .../