15 Replies
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
const { Client } = require("discord.js")
const client = new Client({
intents: [
GatewayIntentBits.Guilds,
GatewayIntentBits.GuildMessages,
GatewayIntentBits.MessageContent,
GatewayIntentBits.GuildMembers,
],
});
client.config = require("./config.json")
client.login(client.config.token).then(() => {
console.log(
client logged in as ${client.user.username}
);
client.user.setActivity(with ${client.guilds.cache.size} servers
);
})
.catch((err) => console.log(err));
just fixedYou need to import GatewayIntentBits from djs
yep
do you know how to make the bot respond and make a command?
this is my code:
client.on('messageCreate', message => {
if (message.content == 'soap'){
message.reply('hello im soap');
}
}
);
Don’t use prefix commands
i want prefix commands tho
is it possible to make the bot to respond to every message that gets sent?
what
why
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
Do not spoonfeed.
That code will api spam anyway
Unknown User•2y ago
Message Not Public
Sign In & Join Server To View
did you figure it out @Soap
shut up
Unknown User•4mo ago
Message Not Public
Sign In & Join Server To View
sorry