#client plb

1 messages · Page 1 of 1 (latest)

eager sparrow
#

const { client, IntentsBitField } = require('discord.js');
const token = process.env['token']

const client = new Client({
intents: [
IntentsBitField. Flags.Guilds,
IntentsBitField. Flags.GuildMembers,
IntentsBitField. Flags. GuildMessages,
IntentsBitField. Flags.MessageContent
],
});

client.on('ready', (client) => {
console.log('Bot is Online!')
});

client.on('messageCreate', (message) => {
if (message.content==='hello') message.reply('hey there!')
})

client.login(token)

cerulean warren
#
const { Client, IntentsBitField } = require('discord.js'); // discords api
const client = new Client({ intents: 32767 }); // declear your bot
client.login(process.env.token) // Get token from your secrets and login

client.on('ready', (client) => { 
  console.log('Bot is Online!') // if the bot is online it logs saying "Bot is Online!"
});

client.on('messageCreate', (message) => {
  if (message.content==='hello') {
  message.reply('hey there!') // simple message command
  }
})