[V3 RPC] Initial RPC library switch (#1634)

* Initial RPC library switch

* Use weak refs to the methods so cog unload works

* Add docs

* Black fixes

* Add jsonrpcserver to Pipfile.lock
This commit is contained in:
Will
2018-05-22 20:29:26 -04:00
committed by palmtree5
parent abfee70eb3
commit 73a427f6aa
8 changed files with 179 additions and 99 deletions

View File

@@ -16,7 +16,6 @@ from discord.ext import commands
from . import __version__
from .data_manager import storage_type
from .utils.chat_formatting import inline, bordered
from .rpc import initialize
from colorama import Fore, Style, init
log = logging.getLogger("red")
@@ -173,7 +172,7 @@ def init_events(bot, cli_flags):
print("\nInvite URL: {}\n".format(invite_url))
if bot.rpc_enabled:
await initialize(bot)
await bot.rpc.initialize()
@bot.event
async def on_error(event_method, *args, **kwargs):