This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| API_KEY=[YOUR RANDOM STUFF API KEY HERE! https://api-info.pgamerx.com/register] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| class Bible: | |
| def get(self, book, chapter, verse, **kwargs): | |
| base = f'https://bible-api.com/{book}+{chapter}:{verse}' | |
| translation = kwargs.get('translation') or 'web' | |
| response = requests.get(f"{base}", params={'translation': translation}) | |
| return response.json() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import discord | |
| from discord.ext import commands | |
| import aiosqlite, asyncio | |
| async def setup(): | |
| bot.db = await aiosqlite.connect("storage/bot.db") | |
| await bot.db.execute("CREATE TABLE IF NOT EXISTS mytable (column1, column2)") | |
| await bot.db.commit() |
