discord.py如何制作Requirements.txt [英] discord.py how to make requirements.txt
问题描述
最后,我现在制作了我的不和谐机器人,我需要将其上传到Heroku,以便它可以24/7在线运行.我看了一些有关的视频.youtube家伙正在使用简单的漫游器代码.和他们的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.
我的代码的顶部就像
import discord
from discord.ext import commands
import youtube_dl
from discord import FFmpegPCMAudio
import os
我不想做错什么事,后来我无法修复,因为它在我身上经常发生:v
i dont wanna do smth wrong that I cant fix it later because it happens to me a lot :v
推荐答案
os是默认的python软件包,因此不需要将其包括在内.除此之外,您只有不和谐和youtube_dl,因此请将它们放入您的requirements.txt
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
这篇关于discord.py如何制作Requirements.txt的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!