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:

  1. The bot connects to Reddit
  2. The bot pulls all unread messages
  3. Each message is responded to
  4. 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.

  1. 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.
  2. 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.
  3. I limited the bot to less than 8,000 characters for a total response, but it'll quote entire chapters just fine.
  4. The bot will not respond to mentions in the posts.

Supported Versions

AbbreviationDescription
ESVThe ESV Bible
ASVAmerican Standard Version
ARBArabic Bible (Smith & Van Dyke)
KJVAuthorized King James Bible Version
APOCThe King James Version Apocrypha
LSGLa Bible Louis Segond 1910
BYZByzantine/Majority Textform Greek New Testament
DRB1890 Darby Bible
ELZElzevir Textus Receptus (1624) with Morphology
ITLGiovanni Diodati Bibbia
EMPThe Emphasized Bible
LEBThe Lexham English Bible
SCRThe New Testament in Greek (Scrivener 1881)
FINRaamattu (1933, 1938)
RVRReina Valera Revisada (1960)
RVAReina-Valera Actualizada
RUSRussian Synodal Bible Translation
ESPLa Sankta Biblio
SVVStatenvertaling
STPHStephen’s Textus Receptus (1550)
TKHTanakh, The Holy Scriptures
PBTVersão Fácil De Ler
WHGWestcott and Hort Greek New Testament (1881) with Morphology
YLTYoung’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:

  1. Parse comments with more than one sections of scripture
  2. Add more supported translations. I'm currently eyeing the Get_bible API as a new addition, that should add around 30-40 possible versions.
  3. Make the code more clear.
  4. 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

25118
Loading comments…