Feel free to use Erin to learn how to make a bot!
Make a GitHub issue if you want a new feature to be added to Erin.
Make sure to link the GitHub page or credit Erin if u do decide to fork or host a local instance of Erin!
Hey! we're certainly not pros when it comes to bot making, the bot does have some very clunky parts when it comes to caching and general code quality. We are working around the clock to make it better.
We appreciate any support we can get from the community, including Patreon donations (coming soon!) and/or GitHub PR's with code quality fixes!!!
Note: The API, dashboard, and music module are still under development! and credits to https://nekos.life for the image API!
Patreon donations are coming soon!
If you want to run Erin locally, you'll need to set a couple of things up.
You'll first want fork the repo and clone it to your machine!
First, go to https://github.com/AakashSharma7269/erin and click the Fork
button in the top right.
This will open your newly forked repo in another tab.
Then, clone your repo to your machine.
You can use the command line (via git
) but I find it easier to have an IDE like PyCharm manage this for me.
Then, create a virtual environment (highly recommended but not required) and install all the dependencies in requirements.txt
.
Erin the bot uses MongoDB for storing data. If you do not have it installed on your machine, go to https://www.mongodb.com/try/download and download a server installer for your OS. (The community version is free and works well) Then run the installer. (It will take a couple of minutes, so you can just keep it running in the background) Once it is finished you can close out the installer.
You can also optionally do the following:
- Install docker.
docker image pull mongo
docker run --name erinDb -d -p <port of choice>:27017 -v <volume path>:/data/db/ mongo
- Edit the
CONNECTIONURI
field in the .env file and set it tomongodb://localhost:<the port you chose in step 3>
- Step 4 should get you ready for development. If you restart your development machine then run
docker start erinDb
to start the container.
Note: On linux you will need to runsudo systemctl start docker
andsudo systemctl enable docker
I personally prefer docker as I don't need to install all the software I need individually, instead I can just install docker and pull the image as required (if it's available in the docker repo).
Create a new application in your developer portal page on Discord and call it something like "ErinTestApp."
Then create a new bot for that application and call it something like "ErinTest."
If you are unsure of how to create a bot, I find this guide by RealPython helpful.
Once you are finished, add the bot to a testing server which you don't really care about.
For the permissions, you can just select administrator
instead of manually selecting them all.
You will also need to go to the "bot" tab and enable the server members and presence intents.
At the repo root, create a new file and call it .env
.
(you probably shouldn't commit it so don't add it / gitignore it)
Copy and paste the contents of sample.env
into the .env
file you just made and fill in the Discord bot token and type localhost
for the MongoDB URI, or another URI if you are using a database hosted in the cloud.
pipenv install --ignore-pipfile
Run the bot by running pipenv run python src/main.py