This is the detailed setup and operation instructions for the getBible Bot, a Telegram bot designed to deliver Bible verses and manage user interactions effectively. This bot utilizes Python for its operation, interacting with users through Telegram's bot interface.
These options give you access to this bot, without the need of running your own instance.
- In your browser: https://t.me/getBibleRobot
- In Telegram search for:
getBibleRobot
The Bible Bot is designed to engage users by providing them with instant access to Bible verses and related content through Telegram.
It supports various commands allowing users to retrieve biblical Scriptures, and more, directly within the Telegram platform.
- A Linux system with
systemd
for service management. - Python 3.6 or newer, with
python3-venv
for creating virtual environments. git
for cloning the repository.- A Telegram account to create and manage the bot.
Clone the repository to your preferred location:
git clone https://git.vdm.dev/getBible/robot /home/<YourUsername>/getBibleRobot
Navigate to the bot directory:
cd /home/<YourUsername>/getBibleRobot
Within the bot directory, create and activate a Python virtual environment:
python3 -m venv venv
source venv/bin/activate
Install required Python packages specified in requirements.txt
pip install -r requirements.txt
Copy the provided .env.template
to a new file named .env
and populate it with your specific values:
cp .env.template .env
nano .env
The .env
file will require the following configurations:
TELEGRAM_TOKEN
: Your Telegram bot's API token.TRANSLATION
: (Optional) default:kjv
DEFAULT_VERSE
: (Optional) default:1 John 3:16
GETBIBLE_URL
: (Optional) default:https://getBible.net/
see Joomla Component to host your own getBible.WELCOME_MESSAGE
: (Optional) default:Welcome to the official getBible.net telegram bot.\n\n/help for more info.
HELP_MESSAGE
: (Optional) default: see config.py
- Message
@BotFather
on Telegram to create a new bot. - Follow the instructions and copy the provided API token.
- Paste this token into your
.env
file for theTELEGRAM_TOKEN
value.
For more detailed instructions, refer to Telegram's official bot documentation.
Ensure your virtual environment is activated and start the bot with:
python bot.py
This command initiates the bot based on the script's logic and Telegram's bot API interaction.
To run the bot as a systemd service, create a unit file:
sudo systemctl edit --force --full getBibleRobot.service
Add the following configuration, adjusting paths as necessary:
[Unit]
Description=getBible Bot Service
After=network.target
[Service]
User=<YourUsername>
Group=<YourGroup>
WorkingDirectory=/home/<YourUsername>/getBibleRobot
ExecStart=/home/<YourUsername>/getBibleRobot/venv/bin/python /home/<YourUsername>/getBibleRobot/bot.py
[Install]
WantedBy=multi-user.target
Enable and start the service:
sudo systemctl enable getBibleRobot.service
sudo systemctl start getBibleRobot.service
The bot supports various commands for user interaction see HELP_MESSAGE.
Available commands:
You can use a reference to get verses like:
- /bible 1 John 3:16
- /bible John 3:16-19;1 John 3:10-17
- /bible Gen 1:1-5 codex
- /bible Ps 1:1-5 aov
- /search: Search the Scriptures (soon..)
- /help: To get this help message again
Ensure these commands are registered with @BotFather
to make them visible to your bot's users.
This project is licensed under the GNU GPL v2.0. See the LICENSE file for more details.