Code not being detected

does anyone know why this wont work in my repl?
if ( !== ‘Survival’) setInterval(function() { (‘/minecraft:gamemode creative’), 60 }) I wont detect it at all

I don’t think this is valid js syntax:

if ( !== 'Survival') // wrong quotes
{ // missing these
setInterval(function() {'/minecraft:gamemode creative')  // Wrong quotes here and extra space
}, 60); // } shouldn’t be after the 60

I will test it but I also been looking around for a auto op for it

its just lagging the bot are you able to look at it itself

to me the code looks correct but idk at the same time

also the ram has been going up with cached data in the ram and idk how to clear it

Auto op? Like in Minecraft? You can’t do that in js.

seen it done before dragon

What kind of bot is it? More information would be helpful.

minecraft bot it runs mineflayer

are ya able to look at the repl itself?

Did you provide the link? Also your MC command looks wrong

i invite but i could to a link

would you want a invite or just the link to the bot?

So what is your problem again? Is it not setting the game mode?

its setting gamemode for 1 server but not the rest

im gonna put the servers in the bot if that is fine

You can make one liner conditions like these in js:

if ( !== ‘Survival’) setInterval(function() {‘/minecraft:gamemode creative’)}, 60 )

Backticks as quotes don’t generally create problems either.

1 Like

tried it already didn’t work

Good to know for the first part, secondly is not a backtick.

like is it supposed to be between
bot.on(‘login’, async () => {

console.log(logged in as ${bot.username})
or not?