Discord bot coding problem

hi! so i’m making a discord bot using glitch and my friend remixed her project to my bot. my bot isn’t going online (in discord) so i tried to format the file but it keeps saying line 29 ->

bot.commands.set(props.help.name, ( props = ));

has a syntax error. i’m not familiar with coding and i really need help with this. it’ll be great if someone could help edit the project-


SyntaxError: Unexpected token )

12:29 AM

at createScript (vm.js:80:10)

12:29 AM

at Object.runInThisContext (vm.js:139:10)

12:29 AM

at Module._compile (module.js:617:28)

12:29 AM

at Object.Module._extensions…js (module.js:664:10)

12:29 AM

at Module.load (module.js:566:32)

12:29 AM

at tryModuleLoad (module.js:506:12)

12:29 AM

at Function.Module._load (module.js:498:3)

12:29 AM

at Function.Module.runMain (module.js:694:10)

12:29 AM

at startup (bootstrap_node.js:204:16)

12:29 AM

at bootstrap_node.js:625:3

12:29 AM

a few seconds ago

Jump To/app/bot.js:29

12:29 AM

bot.commands.set(props.help.name, ( props = ));

12:29 AM

^

12:29 AM

12:29 AM

SyntaxError: Unexpected token )

12:29 AM

at createScript (vm.js:80:10)

12:29 AM

at Object.runInThisContext (vm.js:139:10)

12:29 AM

at Module._compile (module.js:617:28)

12:29 AM

at Object.Module._extensions…js (module.js:664:10)

12:29 AM

at Module.load (module.js:566:32)

12:29 AM

at tryModuleLoad (module.js:506:12)

12:29 AM

at Function.Module._load (module.js:498:3)

12:29 AM

at Function.Module.runMain (module.js:694:10)

12:29 AM

at startup (bootstrap_node.js:204:16)

12:29 AM

at bootstrap_node.js:625:3

Hello @huangsushi! Welcome to the community! Are you looking to keep your bot online 24/7?

2 Likes

hello TheBigC, yes i want my bot to be online 24/7. to be honest, i don’t understand about coding much, especially javascript so even if you tell me something i might not understand as i’m super unfamiliar :sweat_smile: :sob: if it’s easier for you, i can invite you to access the project to see what’s wrong :slight_smile: sorry if this sounds rude or anything-

Sorry - but you can’t have your bot online 24/7 without Glitch’s paid plan. See PSA: Glitch does not allow pinging services.

oh, it’s okay if the bot isn’t online 24/7 i guess. i’m more of a python user, but do you need to run the code or anything for the bot to be online? because my bot doesn’t seem to be online

You have to visit the project site at yourprojectname.glitch.me to keep it online for 5 minutes. Otherwise, you’d need the paid plan.

1 Like

ah i see! what about the unexpected token syntax error? i have no idea on how to fix that

or maybe if you can spot a mistake of this code-?

bot.commands.set(props.help.name, ( props = ));

anyone else who can possibly help-? @glitch_support

bot.commands.set(props.name,props);

if you’re in to python, use discord.py as it will be much easier for you rather than learning a new coding language and a new library

btw this worked! thanks a lot

1 Like

google, The Source Code or Plexi Development for well done videos for discord.js

:+1: i have another question: the bot is coming online but the help command (or any other commands) doesn’t seem to work

invite me to your project

@huangsushi That’s a private project. Try DMing an invite link through private msg.