mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-07 09:52:30 -05:00
[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:
@@ -4,5 +4,36 @@
|
||||
RPC
|
||||
===
|
||||
|
||||
.. automodule:: redbot.core.rpc
|
||||
.. currentmodule:: redbot.core.rpc
|
||||
|
||||
V3 comes default with an internal RPC server that may be used to remotely control the bot in various ways.
|
||||
Cogs must register functions to be exposed to RPC clients.
|
||||
Each of those functions must only take JSON serializable parameters and must return JSON serializable objects.
|
||||
|
||||
To begin, register all methods using individual calls to the :func:`Methods.add` method.
|
||||
|
||||
********
|
||||
Examples
|
||||
********
|
||||
|
||||
Coming soon to a docs page near you!
|
||||
|
||||
*************
|
||||
API Reference
|
||||
*************
|
||||
|
||||
.. py:attribute:: redbot.core.rpc.methods
|
||||
|
||||
An instance of the :class:`Methods` class.
|
||||
All attempts to register new RPC methods **MUST** use this object.
|
||||
You should never create a new instance of the :class:`Methods` class!
|
||||
|
||||
RPC
|
||||
^^^
|
||||
.. autoclass:: redbot.core.rpc.RPC
|
||||
:members:
|
||||
|
||||
Methods
|
||||
^^^^^^^
|
||||
.. autoclass:: redbot.core.rpc.Methods
|
||||
:members:
|
||||
|
||||
Reference in New Issue
Block a user