Answer the question
In order to leave comments, you need to log in
How to host a discord bot if I use cogs?
Hello, I created a bot for discord, but I use cogs - that is, there is one file in which the token is located and a code that also launches files from a certain folder with the ending (".py")
for filename in os.listdir("./cogs" ):
if filename.endswith(".py"):
bot.load_extension(f"cogs.{filename[:-3]}")
I know how to host the bot if all the code is in one file, but I don't know how if multiple files are
used I use Heroku hosting
Answer the question
In order to leave comments, you need to log in
Execute these commands:
git add .
git commit -am "make it better"
git push heroku master
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question