Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

discord.js V13

const Discord = require("discord.js");
const client = new Discord.Client({
	intents: [Discord.Intents.FLAGS.GUILDS, Discord.Intents.FLAGS.GUILD_MEMBERS, Discord.Intents.FLAGS.GUILD_BANS, Discord.Intents.FLAGS.GUILD_MESSAGES, Discord.Intents.FLAGS.DIRECT_MESSAGES]
}); // DISCORD.JS V13

client.on("messageCreate", message => {
if(message.content = "!ping") {
	message.channel.send("pong!")
  }
})

client.on('ready', () => {
  console.log(`Logged in as ${client.user.tag}!`);
});

client.login('YOUR_TOKEN')
Comment

discord.js v13 client

const Discord = require("discord.js");
const client = new Discord.Client({
	intents: [Discord.Intents.FLAGS.GUILDS, Discord.Intents.GUILD_VOICE_STATES, Discord.Intents.FLAGS.GUILD_MEMBERS, Discord.Intents.FLAGS.GUILD_BANS, Discord.Intents.FLAGS.GUILD_MESSAGES, Discord.Intents.FLAGS.DIRECT_MESSAGES]
});
// discord.js v13
Comment

PREVIOUS NEXT
Code Example
Javascript :: text and icon on same line react native 
Javascript :: javascript print all items in array 
Javascript :: javascript replace string at position 
Javascript :: canada postal code regex 
Javascript :: javascript iterate object 
Javascript :: javascript link to another page 
Javascript :: js navigate to another page 
Javascript :: function redirect javascript 
Javascript :: get a element using name in jquery 
Javascript :: get first two letter of an array javascript 
Javascript :: function expression and function declaration 
Javascript :: node redirection 
Javascript :: linking in react native 
Javascript :: how to find length of string in javascript without using length method 
Javascript :: how to print numbers in javascript 
Javascript :: get random letter js 
Javascript :: html canvas draw base64 image 
Javascript :: nodejs readdir 
Javascript :: store array in localstorage 
Javascript :: array filter falsy values 
Javascript :: on uncheck checkbox hide button jquery 
Javascript :: extract number from string 
Javascript :: polyfill for apply 
Javascript :: react native android run 
Javascript :: Found multiple occurrences of org.json.JSONObject on the class path: 
Javascript :: system collections generic list to javascript array 
Javascript :: execute JS code after pressing space bar 
Javascript :: imagebackground in react native 
Javascript :: inarray jquery 
Javascript :: jquery get unique values from array 
ADD CONTENT
Topic
Content
Source link
Name
7+9 =