Search code examples
herokudiscorddiscord.pybots

How do I turn on/off my discord bot worker on heroku using Discord command?


I have a discord bot deployed to Heroku and I don't want to open the heroku website every time in order to turn on/off my discord bot from the worker tray. Is there a way to control my discord bot from discord commands using another managing bot?


Solution

  • You can configure your managing bot to use and make calls to the Heroku Platform API's. Particularly, the Dyno section specifies how you can Create, Restart and Stop your Dynos by making API calls by passing in your App ID/Name and Dyno ID/Name.