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
systemdfor service management. - Python 3.6 or newer, with
python3-venvfor creating virtual environments. gitfor 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>/getBibleRobotNavigate to the bot directory:
cd /home/<YourUsername>/getBibleRobotWithin the bot directory, create and activate a Python virtual environment:
python3 -m venv venv
source venv/bin/activateInstall required Python packages specified in requirements.txt
pip install -r requirements.txtCopy the provided .env.template to a new file named .env and populate it with your specific values:
cp .env.template .env
nano .envThe .env file will require the following configurations:
TELEGRAM_TOKEN: Your Telegram bot's API token.TRANSLATION: (Optional) default:kjvDEFAULT_VERSE: (Optional) default:1 John 3:16GETBIBLE_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
@BotFatheron Telegram to create a new bot. - Follow the instructions and copy the provided API token.
- Paste this token into your
.envfile for theTELEGRAM_TOKENvalue.
For more detailed instructions, refer to Telegram's official bot documentation.
Ensure your virtual environment is activated and start the bot with:
python bot.pyThis 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.serviceAdd 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.targetEnable and start the service:
sudo systemctl enable getBibleRobot.service
sudo systemctl start getBibleRobot.serviceThe 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.