const Discord = require("discord.js")
      
      const client = new Discord.Client({ intents: ["GUILDS", "GUILD_MESSAGES"] })
      client.on("ready", () => {
        console.log(`Logged in as ${client.user.tag}!`)
        client.user.setActivity("##Set your activity here")
      })
      client.login("Your Bot Token")
      Javascript language logo

      Discord bot start template

      0

      5

      avatar
      khalid35
      discord
      Discord Js Cookbook

      When a Discord client is initialized, it registers an onready event handler which logs in the user as specified in the intents field. The onready event handler then sets the user's activity to the value provided in the activity field.

      Shortcut: discord.start

      0 Comments

        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.