taint goblin
taint goblin
Explore posts from servers
DIAdiscord.js - Imagine a bot
Created by taint goblin on 7/8/2024 in #djs-questions
Creating first bot and ran into problem
Ive already done nmp i and installed discord.js in the terminal (using VSC) and when i try to run my code it says cannot run import statement outside a module
import {Discord} from 'discord.js';
const client = new Discord.Client();

client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);
});

client.on('message', message => {
// Here is where you need to code
if(message.content == "Node.js is cool") {
message.channel.send("Yea!");
}
});

client.login("TOKEN");
import {Discord} from 'discord.js';
const client = new Discord.Client();

client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);
});

client.on('message', message => {
// Here is where you need to code
if(message.content == "Node.js is cool") {
message.channel.send("Yea!");
}
});

client.login("TOKEN");
i did replace token with the actual token
10 replies
VVALORANT
Created by taint goblin on 6/5/2024 in #community-help
Any ideas on what this is :skull:
No description
5 replies