Skip to Content

Discord Bot

JavaScript

The Discord platform allows for bot accounts developed in JavaScript using the Node JS framework.

FFMPEG Library

This bot uses ffmpeg audio libraries to download raw sound from Youtube videos and stream it into a Discord voice channel.


APIs

This project was my first time using an API. In this case, I was utilizing Discord documentation and services to launch the bot on their platform.


This is one of my older projects that I built back when Discord started banning a lot of public bot accounts that played music. I believe this was due to copyright issues with Youtube Music because most of big public bots that were used in Discord servers primarily relied on Youtube video links to play requested music. After a quick glance at the documentation for bot accounts on the platform, I made a simple bot in JS that I then connected to a few of my servers.

The bot essentially runs in a constant loop, awaiting for any user to type a message with a special prefix into some dedicated text channel. If a message contained the required prefix - it would be interpreted as a command, leading to its processing and execution.

The more difficult part of the project was utilizing ffmpeg to download a whole video onto the machine that hosts the bot, strip the raw audio from it and then stream it into a discord channel. Looking back at this project now I realize this is very inefficient and there are probably much better APIs in place to accomplish this function. Nonetheless, my bot was a success, allowing my friends and I enjoy sharing music in calls. This project was made before Spotify came up with the idea of music jams...

CrowdFinder (COMP 3350 Final Project)