scripture_bot announcement!
#scripture_bot V1.0 announcement/documentation
Introduction:
At the beginning of summer in 2018, the tried and true versebot stopped working and maintenance for the project had ceased. Versebot was a service that was used by many redditors to automatically post scripture just by mentioning the bot in a comment.
I wanted to see if the bot was easily maintainable, and whether or not it would be simple for me to just get it running myself, so I had a look at it and it wasn't. So I got some help and set out to make an alternative.
Purpose:
This bot is intended to be simple to host, and easy to maintain. I wanted a project under my belt that I could put on my resume, and I wanted to make something that could be worked on by others.
Design:
The bot is powered by AWS Lambda, and Lambda itself will invoke the bot every minute. To give a basic rundown, the bot is basically doing the following:
- The bot connects to Reddit
- The bot pulls all unread messages
- Each message is responded to
- The bot deactivates
So, the bot isn't active nonstop. Running on a timer allows the bot to continue even if there's an uncaught exception that would normally cause it to crash, and even if it crashes, it still marks that comment as read before processing, so it's just skipped the next time the bot activates and the other unread messages can be processed.
So, if the bot doesn't respond after a minute, you might want to double-check what you asked for.
Instead of using modules like beautiful soup, I use the Biblia REST API for all your non-ESV needs, and the ESV REST API for your ESV needs.
Usage
Simply write the following in a comment, and that's how the bot basically works.
[u/scripture_bot](/u/scripture_bot)! John 3:16 KJV.
Wait a minute, and you should get:
John 3:16 KJV
For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life.
this bot uses the Biblia web services from Faithlife Corporation | source code | message the developers
Now there are some limitations.
- Only one passage at a time. I intend on writing something that supports multiple comments in the future, but for now we have a bot that only handles one scripture request at a time.
- When querying books such as 1st Corinthians, you'll get some unintended results if you attempt to call the whole chapter. So, for how it's designed now, it'll parse queries easier if you use 1st, 2nd, 3rd and so on.
- I limited the bot to less than 8,000 characters for a total response, but it'll quote entire chapters just fine.
- The bot will not respond to mentions in the posts.
Supported Versions
| Abbreviation | Description |
|---|---|
| ESV | The ESV Bible |
| ASV | American Standard Version |
| ARB | Arabic Bible (Smith & Van Dyke) |
| KJV | Authorized King James Bible Version |
| APOC | The King James Version Apocrypha |
| LSG | La Bible Louis Segond 1910 |
| BYZ | Byzantine/Majority Textform Greek New Testament |
| DRB | 1890 Darby Bible |
| ELZ | Elzevir Textus Receptus (1624) with Morphology |
| ITL | Giovanni Diodati Bibbia |
| EMP | The Emphasized Bible |
| LEB | The Lexham English Bible |
| SCR | The New Testament in Greek (Scrivener 1881) |
| FIN | Raamattu (1933, 1938) |
| RVR | Reina Valera Revisada (1960) |
| RVA | Reina-Valera Actualizada |
| RUS | Russian Synodal Bible Translation |
| ESP | La Sankta Biblio |
| SVV | Statenvertaling |
| STPH | Stephen’s Textus Receptus (1550) |
| TKH | Tanakh, The Holy Scriptures |
| PBT | Versão Fácil De Ler |
| WHG | Westcott and Hort Greek New Testament (1881) with Morphology |
| YLT | Young’s Literal Translation |
Source Code
My source code for the project can be found here.
All licenses are found in the source code, and if you wish to run the bot yourself, the README has all the instructions needed.
Thanks
I want to thank u/matt_bishop for working on getting the AWS service up and running to host the bot.
I want to thank u/terevos2 for helping with the more in-depth Reddit questions.
I want to thank u/sierrawhiskeyfoxtrot, u/pjsans, u/Dash_Alpha for helping with figuring out where to even start.
Suggestions and Future Updates
So, I've already planned on doing the following:
- Parse comments with more than one sections of scripture
- Add more supported translations. I'm currently eyeing the Get_bible API as a new addition, that should add around 30-40 possible versions.
- Make the code more clear.
- Making the formatting a bit neater.
So, I'm okay with suggestions, but like the above four items or so, I'm kind of crunched on time. I'm about to finish school for IT Security, I just got a new job, I have a second baby, and I'm studying for the palo alto firewall exam.
So, I don't really have a date for the code updates. I'll still be performing maintenance so if the bot goes down I'll try my best to fix it.
Bug Reports
I've implemented a logging structure that'll print to the console diagnostic information. u/matt_bishop has it set up to be sent to CloudWatch, so I'll have your queries recorded even if the query fails.
You can submit bugs by messaging the mods of r/scripturebot
Before you do those things, just make sure that your queries are following the instructions laid out in the usage section. If they do, and the bot doesn't work still,go ahead and send a message with the date, time and query you attempted(permalinks are perfect!). I'll try my best to see what caused the issue, and make an attempt to fix it.
Changelog:
10/1/2018: I added Apocrypha Support. APOC is the version you will use to call it.
Posted Sep 25, 2018, 6:03 PM UTC · edited