Gipsy37453

Index.js

Jan 25th, 2022
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. const Discord = require("discord.js"); //Requiring Discord.js
  2. const config = require(`./config.json`); //Requiring Config,json
  3. const client = new Discord.Client({intents: ["GUILDS","GUILD_MESSAGES"]}); //Intents
  4.  
  5. client.on("messageCreate",message =>{
  6. if (message.content === "h!ping"){ //Trigger
  7. message.reply("Pong!") //Reply To The Trigger
  8. } //You Can Add More If You Want
  9. })
  10.  
  11. console.log("Bot Is Ready") // Simple Code By Dhananjay
  12. client.login(config.token); // Bot Token In config.json | You Can Install dotenv And Use client.login("proccess.env.TOKEN") Then Make A .env File Then Put Like This TOKEN=YOURTOKEN
Advertisement
Add Comment
Please, Sign In to add comment