Skip to content

music bot template code and completed code for hack's building bots workshop spring 2024

Notifications You must be signed in to change notification settings

uclaacm/hack-building-bots-s24

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Building Bots Spring 2024

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

Setup

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 mediaplex

You 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-ext

FFMPEG 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
ffmpeg

Mac OS

brew update
brew upgrade
brew install ffmpeg
ffmpeg

Windows

lol install the executable :')

That's it, have fun!!!!

About

music bot template code and completed code for hack's building bots workshop spring 2024

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published