pythonherokubotsdiscord.pyrequirements

discord.py how to make requirements.txt


finally I made my discord bot now I need to upload it to Heroku so it can be online 24/7. I watched some videos about that. youtube guys were using a simple bot code. and their requirements.txt file be like

discord

yea literally this because their code is so simple. how do I add my other things into that.

top of my code is like

import discord
from discord.ext import commands
import youtube_dl
from discord import FFmpegPCMAudio
import os

i dont wanna do smth wrong that I cant fix it later because it happens to me a lot :v


Solution

  • os is a default python package so it doesn't need to be included. Aside from that you only have discord and youtube_dl so place those in your requirements.txt

    discord
    youtube_dl