Answers for "discord.js package"

1

discord.js package

const Discord = require ('discord.js')
const bot = new Discord.Client()

bot.on("ready", async () => {
    console.log("the bot is ready")
})

client.on('message', msg => {
  if (msg.content === '!ping')
    msg.reply(
      "pong!"
    )
});


//put here the token
bot.login('TOKEN')
Posted by: Guest on October-03-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language