Skip to content

Instantly share code, notes, and snippets.

@renesansz
Last active October 20, 2020 03:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save renesansz/9fa0ff925e6aec372cd5d851f0b597d4 to your computer and use it in GitHub Desktop.
Save renesansz/9fa0ff925e6aec372cd5d851f0b597d4 to your computer and use it in GitHub Desktop.
discord greeter bot
// Run dotenv
require('dotenv').config();
const Discord = require('discord.js');
const client = new Discord.Client();
client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);
});
client.login(process.env.DISCORD_TOKEN);
@KaminoCodes
Copy link

Hi, im new to coding and am trying to make my own discord bot. What do I replace user.tag and env.DISCORD_TOKEN with?

@renesansz
Copy link
Author

renesansz commented Oct 20, 2020

Hi, im new to coding and am trying to make my own discord bot. What do I replace user.tag and env.DISCORD_TOKEN with?

@WaffleCodez you can read the tutorial that I've written here, this will give you the whole picture of the process why we have these codes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment