Skip to content
vlOd edited this page May 26, 2024 · 12 revisions

How to setup PYMusicBot V2

This guide will you show you how to setup PYMusicBot V2
First install Python and the dependencies before proceeding with the rest of the guide

1. Dependencies

Required packages

This bot needs the following packages: discord.py (from Github), PyYAML, PyNaCl, yt-dlp
To install them, run the following commands:

  • Windows: python -m pip install git+https://github.com/Rapptz/discord.py/ PyYAML PyNaCl yt-dlp
  • Linux: python3 -m pip install git+https://github.com/Rapptz/discord.py/ PyYAML PyNaCl yt-dlp

PATH/$PATH requirements

This bot needs FFmpeg and FFprobe to be in the path environment variable
Here you can find download instructions for FFmpeg and FFprobe

  • Windows: To add them to the path environment variable, you can move both of them in C:\Windows
  • Linux: If you installed FFmpeg or FFprobe from a repository, you should already have them in /usr/bin (which is meant to be in $PATH already) otherwise you probably know what you are doing

2. Create a bot account

We need to create a bot account so PYMusicBot V2 can login
Visit the Discord developer portal and follow these steps:

  1. Click on New Application
  2. Click on Bot from the left sidebar
  3. It will ask you to create a bot, so do that
  4. Click on Reset Token and copy that token (we will need it shortly after)
  5. Make sure to enable Server Members Intent as well (under Privileged Gateway Intents)

3. Download PYMusicBot

We need to now download the files of PYMusicBot
Go to the PYMusicBot repository and then follow these steps:

  1. Click on the <> Code button
  2. Click on Download ZIP
  3. Extract the folder PYMusicBot-main from the ZIP archive (you must extract it as PYMusicBot creates some files)

Warning

It is recommended to not edit any of the python files if you don't know what you are doing (especially Config.py!)

4. Finishing up

  1. Go in to the folder you just extracted and create a file called token.txt, in there, paste the token you have aquired from the Discord developer portal

Note

Make sure there aren't spaces or anything as such other than the token in the file

  1. Run "Main.py", it should be possible to double click it (Windows only)
  2. You can now enjoy PYMusicBot! Make sure to check out config.yml for any additional configuration