Home > Blockchain >  When I try to execute my script the console on replit just doesnt work
When I try to execute my script the console on replit just doesnt work

Time:04-05

I am very new to Javascript so please bear with me! When I try to execute my script it doesnt respond! It just keeps dropping on to the next line waiting for me to write node index.js AGAIN. I have posted 2 images in the Imgur album, the first one is me writing node index.js and the second is me pressing enter and the response. Literally blank. I would like some help as I feel like this is the last step to get my bot up and running! :D. screenshot

screenshot#2

screenshot#3

CodePudding user response:

Your code seems to be in the form:

const { Client, Intents } = require('discord.js');
const client = new Client({ intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES] });
const {token} = require('./token.json');
var jsonconfig = require("./config.json")
var jsonconfig,DISCORD_ID
var CMDS = jsonconfig.CMDS

var prefix = 'p!'
client.on("message", message => {
 // stuff
})

so basically it seems to attach some kind of listener, and then reaches the end. So it does nothing...

  • Related