leolucasbr89
DIAdiscord.js - Imagine an app
•Created by leolucasbr89 on 8/17/2023 in #djs-questions
peoples my bot, dont work. Event 'messageCreated' the bot return nothing
const { token } = require('./token.json');
const Discord = require('discord.js');
const client = new Discord.Client({
intents: [
Discord.GatewayIntentBits.Guilds,
Discord.GatewayIntentBits.GuildMembers,
Discord.GatewayIntentBits.MessageContent,
],
partials: [
Discord.Partials.Message,
Discord.Partials.Channel,
Discord.Partials.GuildMember,
Discord.Partials.User,
Discord.Partials.GuildScheduledEvent,
],
});
client.on('ready', () => {
console.log('This bot is now online', client.user.tag)
client.user.setActivity('Rodando como bot mais lindo do Brasil')
});
client.on('messageCreate', (message) => {
console.log('oi')
})
client.login(token);
3 replies