how to put token in .env file discord.js code example
Example: how to import token from .env file discord bot
require('dotenv').config();
// process.env.NODE_ENV allows you to get the environment the node process is in
let ver = process.env.NODE_ENV;
client.on('ready', () => {
if (ver === 'production') {
client.user.setActivity('An Idiot\'s Guide', { type: 'STREAMING', url: 'https://twitch.tv/something' })
} else {
client.user.setActivity('in code land', { type: 'PLAYING' });
}
});