1/* If you are a mac user, do this in TERMINAL
2If you are a Window/Linux user, do this in COMMAND PROMPT
3
4npm install discord.js
5
6DISCORD.JS IS NOW INSTALLED.
7I suggest looking on youtube for a tutorial on setting up a project, but here are the basics.
8
9
10THIS CODE SHOULD BE IN A "index.js" or "main.js" or whatever your main file is.*/
11
12const Discord = require('discord.js');
13const client - new Discord.Client();
14const /*you can have any prefix you want here*/ prefix = "?"
15
16client.on("ready", () => {
17 console.log('literally anything you want goes here')
18})
19
20//SUPER BASIC COMMAND: BASICALLY SHOWS THAT YOUR BOT CAN SPEAK
21client.on('message', message => {
22 if(message.content.startsWith(`${prefix}ping`)){
23 message.channel.send('pong!');
24 }
25})
26
27
28//EXTREMELY IMPORTANT: GET YOUR TOKEN FROM THE DISCORD DEVELOPER PORTAL
29//NEVER EVER EVER EVER TELL/GIVE ANYONE YOUR TOKEN!
30client.login('your token here');