Skip to content

Instantly share code, notes, and snippets.

@LingleDev
Last active August 29, 2019 03:51
Show Gist options
  • Save LingleDev/bead68623f9c6fb486ae169ac1e230af to your computer and use it in GitHub Desktop.
Save LingleDev/bead68623f9c6fb486ae169ac1e230af to your computer and use it in GitHub Desktop.
Musicbot Example
token=random-bot-token
ytapi_key=random-ytapi-key
require('dotenv').config() // Setup the process.env variables
const discord = require('discord.js'), // Import Discord.js module
bot = new discord.Client() // Create a new bot user
global.embed = discord.RichEmbed // Lets us access the RichEmbed object from anywhere
bot.on('ready', () => {
console.log(`${bot.user.username} is ready for action!`)
})
bot.login(process.env.token)
{
"dependencies": {
"discord.js": "latest",
"ytdl-core": "latest",
"snekfetch": "latest",
"ffmpeg": "latest",
"ffmpeg-binaries": "latest",
"opusscript": "latest",
"node-opus": "latest"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment