Code Monkey home page Code Monkey logo

erasmus's Introduction

Erasmus

Discord Bots Build Status codecov License Poetry Checked with pyright Ruff Code style: black

A Bible bot for Discord

Invite Erasmus to your server

Commands

  • /verse - Look up a verse in your preferred or selected version
  • /search - Search for terms in your preferred or selected version
  • /bibles - List the Bible versions supported
  • /bibleinfo - Display information about the specified Bible version
  • /version set - Set your preferred version
  • /version clear - Clear your preferred version
  • /version show - Display information about how Erasmus will display verses for you
  • /daily-bread show - Display today's daily bread
  • /daily-bread status - Display the status of automated daily bread posts for this server
  • /serverprefs version set - Set the server's preferred version (Administrator only)
  • /serverprefs version clear - Clear the server's preferred version (Administrator only)
  • /serverprefs version show - Display the server's preferred version (Administrator only)
  • /serverprefs daily-bread set - Schedule the automated daily bread posts (Administrator only)
  • /serverprefs daily-bread stop - Stop the automated daily bread posts (Administrator only)
  • /creed apostles - Display The Apostles' Creed
  • /creed athanasian - Display The Athanasian Creed
  • /creed chalcedon - Display The Chalcedonian Definition
  • /creed nicene - Display The Nicene Creed
  • /creed nicene325 - Display The Nicene Creed (325 AD)
  • /creed nicene381 - Display The Nicene Creed (381 AD)
  • /confess cite - Cite the specified section from the selected confession or catechism
  • /confess search - Search for terms in the selected confession or catechism
  • /invite - Get a link to invite Erasmus to your server
  • /about - Information about Erasmus
  • /news - News from the latest release

Bracket Notation

In addition to the slash-commands listed above, Erasmus will respond to all verse references surrounded in brackets (ex. [John 1:1]) anywhere in a message. By default, Erasmus will look up the verse using the user's default version (set with /version set), the servers's default version (/serverprefs version set), or the ESV. Users can also specify a version to use by appending the version abbreviation after the verse (ex. [John 1:1 KJV]).

Data Privacy Policy

Erasmus retains the following data:

  • A user's internal Discord ID (a snowflake) ONLY if the user sets a preferred version using /version set (this can be deleted using /version clear)
  • A guild's internal Discord ID (a snowflake) ONLY if one of the following conditions is met:
    • A guild administrator sets a preferred version for the guild using /serverprefs version set (this can be deleted using /serverprefs version clear)
    • A guild administrator schedules the automatic daily bread posts for the guild using /serverprefs daily-bread set (this can be deleted using /serverprefs daily-bread stop)

Erasmus never retains message content.

Setup

Ensure that Poetry is installed

Running

poetry install --only main
poetry run erasmus

Development

poetry install
poetry run erasmus

erasmus's People

Contributors

bryanforbes avatar dependabot-preview[bot] avatar dependabot[bot] avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

erasmus's Issues

Doesn't give verses

The Erasmus bot has lately only replied to $help and $creeds. All other commands it does not reply to. Once and a while it will say "Erasmus is typing . . ." but that is all. Is there something I'm missing? I tried setting the version to NIV and ESV.

Needing table information

Hi, I decided to self-host the bot, which you were credited when I decided to do this. However, I tried to run the bot, which worked, and it led another problem:

[2018-03-25 21:48:12] [ERROR ] erasmus.erasmus: Failed to load extension erasmus.cogs.bible. Traceback (most recent call last): File "/root/Erasmus/erasmus/erasmus.py", line 104, in __init__ self.load_extension(extension) File "/root/Erasmus/venv/lib/python3.6/site-packages/discord/ext/commands/bot.py", line 704, in load_extension lib.setup(self) File "/root/Erasmus/erasmus/cogs/bible.py", line 288, in setup bot.add_cog(Bible(bot)) File "/root/Erasmus/erasmus/cogs/bible.py", line 104, in __init__ self.bot.loop.run_until_complete(self._init()) File "uvloop/loop.pyx", line 1364, in uvloop.loop.Loop.run_until_complete File "/root/Erasmus/erasmus/cogs/bible.py", line 108, in _init versions = await select_all(db, table='bible_versions') File "/root/Erasmus/erasmus/db/util.py", line 48, in select_all *args File "/root/Erasmus/venv/lib/python3.6/site-packages/asyncpg/connection.py", line 359, in fetch return await self._execute(query, args, 0, timeout) File "/root/Erasmus/venv/lib/python3.6/site-packages/asyncpg/connection.py", line 1303, in _execute query, args, limit, timeout, return_status=return_status) File "/root/Erasmus/venv/lib/python3.6/site-packages/asyncpg/connection.py", line 1311, in __execute return await self._do_execute(query, executor, timeout) File "/root/Erasmus/venv/lib/python3.6/site-packages/asyncpg/connection.py", line 1323, in _do_execute stmt = await self._get_statement(query, None) File "/root/Erasmus/venv/lib/python3.6/site-packages/asyncpg/connection.py", line 288, in _get_statement statement = await self._protocol.prepare(stmt_name, query, timeout) File "asyncpg/protocol/protocol.pyx", line 171, in prepare asyncpg.exceptions.UndefinedTableError: relation "bible_versions" does not exist

I went ahead and already decided to create a table, however, it seems that I am having trouble attempting to do so, and therefore will need information about it(the table information). I'm running it on Ubuntu 12.04

Add Historic Creeds

Nicene and Apostles, for example. I'll try to find sources later if I can.

Not having to require $ for citing verses

I think being able to cite a verse without a particular syntax such as $ or calling the bot could be helpful, making it easier to cite verses in a discussion setting.

Be able to quote on threads

I have tried to quote verses on threads, but it doesn't seem to work. I'm not sure if there are any limitations on the discord API. If there's nothing that would unable it, I think it would be a cool feature.

I've looked into the issue and it seems that the beta version of discord.py supports it. but I guess it would hold until it's officially released, right?

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: Cannot find preset's package (github>bryanforbes/python-workflows). Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.

Handle RTL text

Any Hebrew will come back RTL. This makes displaying the numbers a bit weird.

Parse references surrounded in brackets in all messages

Parse messages for [book chapter:verse<-chapter:verse> <version>]. For example, the following:

As I look at [John 3:5], I'm reminded that Jesus was referencing [Ezek 36:25-27]

Erasmus would look up the two verses in the user's default version and output them after the message.

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Repository problems

These problems occurred while renovating this repository. View logs.

  • WARN: File contents are invalid JSON but parse using JSON5. Support for this will be removed in a future release so please change to a support .json5 file name or ensure correct JSON syntax.

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • Lock file maintenance

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/codeql-analysis.yml
.github/workflows/unit-tests.yml
pep621
pyproject.toml
  • poetry_core ==1.9.0
poetry
pyproject.toml
  • alembic 1.13.2
  • attrs 23.2.0
  • beautifulsoup4 4.12.3
  • more-itertools 10.3.0
  • fluent.runtime 0.4.0
  • botus_receptus v24.6.1
  • discord-py 2.4.0
  • asyncpg-stubs 0.29.1
  • black 24.4.2
  • coverage 7.6.0
  • mypy 1.11.0
  • pre-commit 3.7.1
  • pytest 8.3.1
  • pytest-asyncio 0.23.8
  • pytest-clarity 1.0.1
  • pytest-cov 5.0.0
  • pytest-mock 3.14.0
  • pytest-recording 0.13.2
  • pytest-sugar 1.0.0
  • pytest-xdist 3.6.1
  • ruff 0.5.4
  • pendulum 3.0.0
pre-commit
.pre-commit-config.yaml
  • RobertCraigie/pyright-python v1.1.372

  • Check this box to trigger a request for Renovate to run again on this repository

Improve help text formatting

$help should output embeds instead of code blocks. RoboDanny already has code for this, it just needs to be made a bit more generic.

Cite BCV and version

The bot should output the book chapter:verse(s) version after the text of a lookup

Extra content

When a verse or chain of verses is cited the phrase "Read full chapter" is appended. This may be the result of a update to BibleHub.

Add Sharia manuals

Sharia manuals are more important than Quran in Islamic law, so it has a significance.

Add guild-specific settings

Certain aspects of the bot could be configurable for each guild:

  • Bible versions
  • Confessions and catechisms (eventually)
  • Command prefix

This will require some sort of database and possibly a web front-end

Feature request: Add LSB translation.

While I'm not aware of an API you can use, I created a Python project for getting the Legacy Standard Bible text by parsing the HTML of https://read.lsbible.com (as their site is actually extremely well structured).

Documentation is available in the form of the README (https://gitlab.com/Magicrafter13/pylsb), as well as docstring comments.

You can get the library via pip (PyPI).

When I get the chance, I'll take a look at your code base, and if I'm able, make the necessary changes myself, and submit a pull request.

Handle when content is longer than 2000 characters

The content sent in a response can only be up to 2000 characters and discord.py will throw an error if the content is longer. Either the bot should split the response or should tell the user to select a range that will return fewer characters.

Add Book of Concord

Source: http://bookofconcord.org/

This will include:

  • Augsburg Confession
  • The Defense of the Augsburg Confession
  • Smalcald Articles
  • Small Catechism
  • Large Catechism
  • Epitome of the Formula of Concord
  • Solid Declaration of the Formula of Concord

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.