Reputation: 25
I made a small bot for my personnal use in discord and I wanted to host it on Heroku but I had trouble with deploying the application, the code is on a private repository on github
I've already made Procfile
, requirement.txt
and runtime.txt
Several month ago I made anothers discord.py bot (async version of discord.py) and I've used the same files as I want to use now.
My Procfile
:
worker: python3 Main.py
My requirements.txt
:
discord.py==1.2.3
My runtime.txt
:
python-3.7.4
My python code
import os
import discord
from discord.ext import commands
client = commands.Bot(command_prefix = "/")
client.remove_command('help')
#Event
@client.event
async def on_ready():
print("Kitsune Bot : Online")
for files in os.listdir('./cogs'):
if files.endswith('.py'):
try:
client.load_extension(f'cogs.{files[:-3]}')
print("{} is running !".format(files))
except Exception as error:
print(error)
client.run(<myToken>)
The expected result is the bot going online and responding to all my function call, however the actual result is an error while deploying the app on heroku :
-----> Installing python-3.7.4
-----> Installing pip
-----> Installing requirements with pip
! Push rejected, failed to compile Python app.
! Push failed```
Upvotes: 0
Views: 349
Reputation: 44
requirements needs to be a file
not a txt file
you can do it by doing touch requirements
Upvotes: 0