Shinyzenith / erin

Verified discord moderation and economy bot

Home Page:https://erin0400.github.io/invite

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Erin. - Discord Bot

Erin. Discord Bot

Music, Moderation, Trivia, Economy, Gambling, and NSFW commands!

discord.py dev badge dev badge

Join our Discord servers:

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!

Contribute

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!

Monetary support

Patreon donations are coming soon!

Run locally

If you want to run Erin locally, you'll need to set a couple of things up.

Step 1: Fork, clone, and open on your machine

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.

Step 2: Download and install MongoDB

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:

  1. Install docker.
  2. docker image pull mongo
  3. docker run --name erinDb -d -p <port of choice>:27017 -v <volume path>:/data/db/ mongo
  4. Edit the CONNECTIONURI field in the .env file and set it to mongodb://localhost:<the port you chose in step 3>
  5. 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 run sudo systemctl start docker and sudo 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).

Step 3: Create a Discord bot.

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.

Step 4: Fill in the variables in the .env file

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.

Step 5: Install the dependencies and run!

Run the following in your terminal to install the dependencies: pipenv install --ignore-pipfile Run the bot by running pipenv run python src/main.py

About

Verified discord moderation and economy bot

https://erin0400.github.io/invite

License:MIT License


Languages

Language:Python 99.2%Language:Shell 0.5%Language:Dockerfile 0.2%