forked from blizzthewolf/SeaCogs
feat(bible): added bible cog
This commit is contained in:
parent
3398100a0f
commit
39fafede67
5 changed files with 62 additions and 0 deletions
21
.docs/bible.md
Normal file
21
.docs/bible.md
Normal file
|
@ -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
|
BIN
.docs/img/bible/set-api.png
Normal file
BIN
.docs/img/bible/set-api.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.6 KiB |
5
bible/__init__.py
Normal file
5
bible/__init__.py
Normal file
|
@ -0,0 +1,5 @@
|
|||
from .bible import Bible
|
||||
|
||||
|
||||
async def setup(bot):
|
||||
await bot.add_cog(Bible(bot))
|
22
bible/bible.py
Normal file
22
bible/bible.py
Normal file
|
@ -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")
|
14
bible/info.json
Normal file
14
bible/info.json
Normal file
|
@ -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": []
|
||||
}
|
Loading…
Reference in a new issue