Entertainment, Administration, Multilingual, Storytelling, A charismatic survivor girl.
AbbyBot is a multi-purpose discord application, mainly dedicated to the entertainment and administrative sector.
AbbyBot plays Abigail "Abby" Monroe as a character, a character designed by 'AstronautMarkus', every action she takes will try to imitate the personality of this fictional character.
AbbyBot is an application for Discord (BOT) designed by reyesandfriends.cl, a project that seeks to create a self-sufficient application for the management and entertainment of servers, through the use of slash_commands
, it also has a multilingual system to switch languages from English
to Spanish
and vice versa.
- Slash commands: AbbyBot owns all its commands using
slash_commands
to make it easier for the user to use. - Events system: AbbyBot has an event system where it will respond to the user in different ways if they do a specific thing, such as mentioning it or deleting messages. This system can be disabled by the administrator.
- Administration system:
(W.I.P)
is currently still considered a work in development, but will be implemented very soon in its initial phase. - Random dialogues: AbbyBot speaks different words in different languages, has different dialogues in order to attract the user's attention.
- 'Abigail': One of AbbyBot's objectives is to present "her" character, each dialogue she has has some story to tell.
AbbyBot is built with the use of global variables (dotenv), so you need to create an .env
file before starting.
- Create a .env file: Using a code or text editor you can create an .env file, it must contain the following content:
Variable | Description |
---|---|
BOT_TOKEN |
The token provided by Discord for your bot (keep this secret). |
DB_HOST |
The database host (e.g., localhost , without port). |
DB_USER |
Username for your database connection. |
DB_PASSWORD |
Password for your database connection. |
DB_NAME |
The name of the schema to be used by AbbyBot. |
EMOJIS |
A list of Discord emojis used randomly by AbbyBot. Example: <:emoji_name:id> |
- Save the file: You must save the .env file in
Python_Discord-AbbyBot
directory, betweenAbby-bot.py
Repository Root
│
├── Python_Discord-AbbyBot/
│ ├── Abby-bot.py
│ └── .env
│
└── README.md
- Create the database: Using the same credentials as the .env except for the discord token, you must connect to a
MySQL database manager
, such as MySQL Workbench, phpMyAdmin, DBeaver, etc.
You must look for a couple of files found in the SQL_Files
directory, inside this you will find two more directories:
Repository Root
│
├── Python_Discord-AbbyBot/
│ └─ SQL_Files/
│ ├─ insert_data/
│ └─ tables_creation/
│
└── README.md
- Use Creation data SQL file: Inside the
tables_creation
directory, there is a .SQL file which has the script to create the tables necessary to store AbbyBot data.
Repository Root
│
├── Python_Discord-AbbyBot/
│ └─ SQL_Files/
│ └─ tables_creation/
│ └─ abbybot.sql
│
└── README.md
Now we simply run the SQL script and the tables will be created.
- Insert Data: To insert the necessary data into the database you created, we must return to the other directory, the one called
insert_data
.
Inside this, you will find different .SQL files:
Repository Root
│
├── Python_Discord-AbbyBot/
│ └─ SQL_Files/
│ └─ insert_data/
│ ├─ abbybot_event_messages.sql
│ ├─ abbybot_help.sql
│ └─ abbybot_tell_story.sql
│
└── README.md
Here, in short, the same thing is repeated, you must open any .SQL script (regardless of the order) and execute it so that the data is inserted, try to do it only once since the tables are auto-incrementing and duplicate data could be generated.
The important thing is that ALL the .SQL files are executed
-Finally, the database will be ready.
To run AbbyBot there are two ways, depending on the operating system or the Distro that you use:
- Open "1. Create Windows environment.bat" - will create a Python virtual environment in the path and then install AbbyBot dependencies.
- Open "2. Activate Windows environment.bat" : it will activate the environment
- From "2. Activate Windows environment.bat" manually drag the file "3. Start Windows environment.bat" and run it: This will start AbbyBot from the console with its environment.
- Check Python version: First you have to verify the version of Python, which is at least 3.10, first we will open a terminal using alt ctrl + alt + t or simply searching for it in the applications menu.
Execute
python3 --version
the system will display the installed Python version.
- Create virtual environment: Using the same terminal
Execute
python3 -m venv venv
the system will display the installed Python version.
- Start environment: After creating the environment, run the following command to activate it:
Execute
source venv/bin/activate
If everything works, in your terminal you should see (venv) before the username:
Execute
(venv) user@mycomputer:
Now all that remains is to install the requirements.
- Install the requirements: To execute all the code you must install all the requirements that AbbyBot needs, in the
requirements.txt
file located at the root of the repository you will find:
Repository Root
│
├── requirements.txt
│
└── README.md
Go to it with the terminal and the environment activated and then install the requirements using pip install:
pip install -r requirements.txt
With the requirements already installed
, the environment activated
, the database created and data inserted
and the .env with its variables ready
, all that remains is to start the main .py
file:
- Run AbbyBot: To run AbbyBot, we must have
all the previous steps completed
, have ourvirtual environment ready and activated
, we must go to thePython_Discord-AbbyBot
directory, within this you will findAbby-bot.py
, which we must execute:
python Abby-bot.py
And if you performed all the steps correctly, everything will be ready!