# Discord Tweet Broadcaster ## Part 1 — Intro to Discord.js ### *1* * Create your project directory, open console/terminal: `mkdir Discord Tweet Broadcaster` * Move to your project directory and initialize it for npm: `cd Discord Tweet Broadcaster` , `npm init -y` * Install Discord.js: `npm i discord.js` * Open the directory in VSCode, and create a page called `bot.js` Now follow along with this [tutorial](https://www.youtube.com/watch?v=7rU_KyudGBY) to create the bot and get it up and running. He's doing it replit, but you should do it in `bot.js`. *You only need to follow along for about the first 15 minutes*. After that it's not necessary. **Before you start:** *First*, when it comes to setting your bot's permissions, he sets the specific ones, but you should just click Administrator when you get to that part. There is no need to get specifc. *Second*, the tutorial's replit is working from an older version of Discord. You need to specifiy Intents with the newst version of Discord — you basically need to tell Discord what your bot is meant to do. The tutorial has you write this: ![](https://i.imgur.com/vOu59XE.png) When it comes time to write that, replace that with this: `const { Client, Intents} = require('discord.js');` `const client = new Client({ intents:[Intents.FLAGS.GUILD_MESSAGES });` If you ever get an error that says `[CLIENT_MISSING_INTENTS]`, know that you're missing an intent. Here is the [list of intents](https://discord.com/developers/docs/topics/gateway#list-of-intents). Just copy paste the one you're trying to do with the same format of `Intents.FLAGS.YOUR_INTENT`. *Third*, the tutorial has you write out his message listener: `client.on('message', msg => {...})` The newest version of Discord is a bit different. When it comes time, replace that with: `client.on('messageCreate', msg => {...})`. The newest version of Discord changed 'message' to 'messageCreate'. **After you successfully get the bot running and get it to work for ping/pong (15:44 in the tutorial video), move on to [Part 2 of Intro to Discord.js](https://hackmd.io/@2RgWuXqdRvm7mKLuS6BTtg/H1NKhvCc5)**