#Discord Shutdown Bot script

5 messages · Page 1 of 1 (latest)

lilac sun
#

Hi, can someone help me make a bot shutdown script

safe junco
#

• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.

lilac sun
#

v19.3.0

#

node

#
require('dotenv/config')
 
const client = new Client({
    intents: [
        GatewayIntentBits.Guilds,
        GatewayIntentBits.GuildMessages,
        GatewayIntentBits.MessageContent,
    ],
})

client.on('ready', () => {
    console.log('Logged in as PrimeAI...')
    client.channels.fetch('1039709734288236585')
  .then(channel => console.log('general'))
  .catch(console.error);
  
})


client.on('messageCreate', (message) => {
    if (message.content === 'ping') {
    message.reply('pong')
    }
})

client.login(process.env.TOKEN)