Giter Site home page Giter Site logo

robot's Introduction

getBible Bot Deployment and Operation Guide

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.

How to use this Bot on Telegram

These options give you access to this bot, without the need of running your own instance.

Purpose of the Bible Bot

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.

Prerequisites

  • 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.

Setup Instructions

Step 1: Cloning the Repository

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

Step 2: Creating a Virtual Environment

Within the bot directory, create and activate a Python virtual environment:

python3 -m venv venv
source venv/bin/activate

Step 3: Installing Dependencies

Install required Python packages specified in requirements.txt

pip install -r requirements.txt

Step 4: Configuring the .env File

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

Obtaining a Telegram Bot Token

  1. Message @BotFather on Telegram to create a new bot.
  2. Follow the instructions and copy the provided API token.
  3. Paste this token into your .env file for the TELEGRAM_TOKEN value.

For more detailed instructions, refer to Telegram's official bot documentation.

Step 5: Running the Bot

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.

Step 6: Setting Up Systemd Service

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

Bot Commands

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.

Licensing Notice

This project is licensed under the GNU GPL v2.0. See the LICENSE file for more details.

robot's People

Contributors

llewellynvdm avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.