Allow central storage of API keys (#2389)

This creates a central location to store external API tokens that can be used between cogs without requiring each cog to be loaded for it to work.

A new set option for `[p]set api` is created to assist in forming bot readable API token locations.

This also updates the Streams cog to utilize the central database.

Tokens are moved from the old data locations in core cogs on load.
This commit is contained in:
TrustyJAID
2019-02-18 16:22:44 -07:00
committed by Toby Harradine
parent 722aaa225b
commit 3f1d416526
7 changed files with 174 additions and 61 deletions

View File

@@ -1,6 +1,7 @@
from .image import Image
def setup(bot):
n = Image(bot)
bot.add_cog(n)
async def setup(bot):
cog = Image(bot)
await cog.initialize()
bot.add_cog(cog)