Welcome to the repository for Hack's spring 2024 workshop building bots. In this repository, we have two folders, one containing the completed bot code and the other with code commented out to provide a template to follow along.
It is highly suggested that you take the time to understand the code and understand the core concepts at a little bit deeper of a level. A lot of this is boilerplate, but boilerplate can still be overlooked and misunderstood.
Anyways... The slides for the workshop are here: BUILDING BOTS SLIDES
MAKE SURE TO CREATE A CONFIG.JSON FILE THAT LOOKS LIKE THIS IN EACH FOLDER
{
"TOKEN": "yourtoken.here",
"CLIENT_ID": "clientidhere",
"GUILD_ID": "guildidhere"
}You should be able to just do npm install inside of each of the folders to install all of the dependencies.
The list is short:
$ npm install discord.js
$ npm install --save discord-player # main library
$ npm install --save @discord-player/extractor # extractors provider
$ npm install --save mediaplexYou have the option of also include the youtube extractor, which will get your discord bot obliterated if it gets somewhat popular.
$ npm install --save youtube-extFFMPEG is also REQUIRED for your bot to be able to stream music. INSTALL IT HERE
OR
Linux (Ubuntu)
sudo add-apt-repository ppa:mc3man/trusty-media
sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get install ffmpeg
ffmpegMac OS
brew update
brew upgrade
brew install ffmpeg
ffmpegWindows
lol install the executable :')That's it, have fun!!!!