diff --git a/.docs/bible.md b/.docs/bible.md new file mode 100644 index 0000000..142fc98 --- /dev/null +++ b/.docs/bible.md @@ -0,0 +1,21 @@ +# Bible + +Bible allows you to get a specific (or random) Bible verse from the [API.Bible](https://scripture.api.bible/) API. +This cog does require an api key to work. + +## Installation + +```bash +[p]repo add sea-cogs https://coastalcommits.com/SeaswimmerTheFsh/SeaCogs +[p]cog install sea-cogs bible +[p]cog load bible +``` + +## Setup + +This cog requires an [API.Bible]() API key to function. You can sign up for an account [here](https://scripture.api.bible/signup). This will also generate your first API key for you. + +Then, you can use `[p]set api` to set the API key. Make sure your formatting matches the screenshot below. +![image](img/bible/set-api.png) + +## Commands diff --git a/.docs/img/bible/set-api.png b/.docs/img/bible/set-api.png new file mode 100644 index 0000000..9727e57 Binary files /dev/null and b/.docs/img/bible/set-api.png differ diff --git a/bible/__init__.py b/bible/__init__.py new file mode 100644 index 0000000..e01e974 --- /dev/null +++ b/bible/__init__.py @@ -0,0 +1,5 @@ +from .bible import Bible + + +async def setup(bot): + await bot.add_cog(Bible(bot)) diff --git a/bible/bible.py b/bible/bible.py new file mode 100644 index 0000000..90b4d65 --- /dev/null +++ b/bible/bible.py @@ -0,0 +1,22 @@ +# _____ _ +# / ____| (_) +# | (___ ___ __ _ _____ ___ _ __ ___ _ __ ___ ___ _ __ +# \___ \ / _ \/ _` / __\ \ /\ / / | '_ ` _ \| '_ ` _ \ / _ \ '__| +# ____) | __/ (_| \__ \\ V V /| | | | | | | | | | | | __/ | +# |_____/ \___|\__,_|___/ \_/\_/ |_|_| |_| |_|_| |_| |_|\___|_| + +import logging + +from redbot.core import commands +from redbot.core.bot import Red + +class Bible(commands.Cog): + """Retrieve Bible verses from the API.bible API.""" + + __author__ = "SeaswimmerTheFsh" + __version__ = "1.0.0" + + def __init__(self, bot: Red): + super().__init__() + self.bot = bot + self.logger = logging.getLogger("red.sea.bible") diff --git a/bible/info.json b/bible/info.json new file mode 100644 index 0000000..49a8fbd --- /dev/null +++ b/bible/info.json @@ -0,0 +1,14 @@ +{ + "author" : ["SeaswimmerTheFsh (seasw.)"], + "install_msg" : "Thank you for installing Bible!\nYou can find the source code of this cog [here](https://coastalcommits.com/SeaswimmerTheFsh/SeaCogs).", + "name" : "Bible", + "short" : "Retrieve Bible verses", + "description" : "Retrieve Bible verses from the API.bible API.", + "end_user_data_statement" : "This cog does not store user information.", + "hidden": true, + "disabled": false, + "min_bot_version": "3.5.5", + "max_bot_version": "3.5.0", + "min_python_version": [3, 10, 0], + "tags": [] +}