A multipurpose bot to assist you with code, moderation and more, while integrating more features in it.
Go to any channel in discord of any server where this bot is invited, and
invoke it using =help
.
If you're interested in growing this project further, Add a .env file based on .env.example file. And add the following things:
- Grab your StackExchange key from http://stackapps.com/
- A lavalink node for the music cog
- Openweathermap API Key for the weather stuff.
- Get the nasa get at https://api.nasa.gov/
- And, the spotify credentials at https://developer.spotify.com/dashboard/
- Create bot on Discord's bot portal
- Make a New Application
- Go to Bot settings and click on Add Bot
- Give Administrator permission to bot
- You will find your bot TOKEN there, it is important that you save it
- Go to OAuth2 and click bot, than add Administrator permissions
- You can follow the link that will appear to add the bot to your discord server
This guide is to assist you with self-hosting and running an instance of this bot for yourself.
Docker is an easy way of containerizing and delivering your applications quickly and easily, in an
convenient way. It's really simple to get started with this, with docker handling all the installation
and other tasks.Configure the environmental variables by renaming the .env.example
file to .env
with the respective
values. Then, run docker-compose --env-file .env up
after getting the project and config ready.
Docker mini guide:
- Running the bot:
docker-compose --env-file .env up
- Stopping the bot:
docker-compose down
- Rebuilding the bot:
docker-compose build
This is a clean and neat way of hosting without using docker. You can follow this if docker doesn't work well on your system, or it doesn't support it. Containers are resource intensive, and your PC might not be able to do it, this is the perfect method to get started with the self-hosting.
You need a postgres database configured locally to run this bot. If you haven't done that yet, take a look at the official documentation from EDB (The company behind postgres) here
Once your done, create the databases and users accordingly, and configure it in .env
as said in the future steps.
- Clone or fork the repository, whichever suits you better.
- Install
pipenv
, a virtual env for python. Command:pip install pipenv
- Create the virtual environment and prepare it for usage using
pipenv update
- Configure the environmental variables by renaming the
.env.example
file to.env
with the respective values for it. If you're using heroku or other platforms that have option for external environmental variables, use that instead of.env
- Configure the options and settings available in
config.py
inside the Bot module, according to your preferences. - Run the server using
pipenv run start
We support database changes and migrations for the latest structures instead of dropping and recreating
them. We use alembic
, a sqlalchemy tool to perform the migrations for us.
Migration guide:
- To do a migration, use this:
alembic revision --autogenerate
- To bring the migration into actual change:
alembic upgrade head
NOTE: If you're using pipenv, go into the shell first using pipenv shell
to use those commands.
Contributions, issues and feature requests are welcome. After cloning & setting up project locally, you can just submit a PR to this repo and it will be deployed once it's accepted. The contributing file can be found here.
We love people's support in growing and improving. Be sure to leave a ⭐️ if you like the project and also be sure to contribute, if you're interested!