Node . command not working for discord

Hey, so I’m EXTREMELY new to everything coding. I’m trying to code a Discord bot- by following a YouTube tutorial, of course- and have made it through almost everything. I’m using Visual Studio Code and node.js. When I try to turn my bot online by running node . in cmd, nothing happens. Here’s my main.js file in visual studio code:

const Discord = require(‘discord.js’);
const client = new Discord.Client();

client.once(‘ready’, () => {
console.log(‘TestBot is online!’);

client.login(‘my bot token’);

According to the tutorial, running node . should activate the bot. However, when I run it, this pops up:

SyntaxError: missing ) after argument list
←[90m at wrapSafe (internal/modules/cjs/loader.js:979:16)←[39m
←[90m at Module._compile (internal/modules/cjs/loader.js:1027:27)←[39m
←[90m at Object.Module._extensions…js (internal/modules/cjs/loader.js:1092:10)←[39m
←[90m at Module.load (internal/modules/cjs/loader.js:928:32)←[39m
←[90m at Function.Module._load (internal/modules/cjs/loader.js:769:14)←[39m
←[90m at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)←[39m
←[90m at internal/main/run_main_module.js:17:47←[39m

Is there something I’m doing wrong? Like I said, I’m extremely new to all this, and it’s entirely possible that I’m just being dumb. Any help would be appreciated!

Count the parenthesis in this (opening parenthesis vs closing parenthesis)

oh my god, im literally stupid haha. thank you so much, it works now.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.