mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-20 18:06:08 -05:00
[V3 Docs] Add and update existing features (#1451)
* [V3 Docs] bump version * Remove removed functions from __all__ * Update docstring format * Update copyright year * Add embed utils docs * Document bot class * Document RPC * Update toctree
This commit is contained in:
@@ -7,10 +7,9 @@ import discord
|
||||
from redbot.core import Config
|
||||
|
||||
__all__ = ["Account", "get_balance", "set_balance", "withdraw_credits", "deposit_credits",
|
||||
"can_spend", "transfer_credits", "wipe_bank", "get_guild_accounts",
|
||||
"get_global_accounts", "get_account", "is_global", "set_global",
|
||||
"get_bank_name", "set_bank_name", "get_currency_name", "set_currency_name",
|
||||
"get_default_balance", "set_default_balance"]
|
||||
"can_spend", "transfer_credits", "wipe_bank", "get_account", "is_global",
|
||||
"set_global", "get_bank_name", "set_bank_name", "get_currency_name",
|
||||
"set_currency_name", "get_default_balance", "set_default_balance"]
|
||||
|
||||
_DEFAULT_GLOBAL = {
|
||||
"is_global": False,
|
||||
|
||||
@@ -35,7 +35,9 @@ def add_topic(topic_name: str):
|
||||
"""
|
||||
Adds a topic for clients to listen to.
|
||||
|
||||
:param topic_name:
|
||||
Parameters
|
||||
----------
|
||||
topic_name
|
||||
"""
|
||||
_rpc.add_topics(topic_name)
|
||||
|
||||
@@ -50,8 +52,10 @@ def notify(topic_name: str, data: JsonSerializable):
|
||||
|
||||
This method will fail silently.
|
||||
|
||||
:param topic_name:
|
||||
:param data:
|
||||
Parameters
|
||||
----------
|
||||
topic_name
|
||||
data
|
||||
"""
|
||||
_rpc.notify(topic_name, data)
|
||||
|
||||
@@ -67,10 +71,11 @@ def add_method(prefix, method):
|
||||
|
||||
This method will fail silently.
|
||||
|
||||
:param prefix:
|
||||
:param method:
|
||||
Parameters
|
||||
----------
|
||||
prefix
|
||||
method
|
||||
MUST BE A COROUTINE OR OBJECT.
|
||||
:return:
|
||||
"""
|
||||
_rpc.add_methods(
|
||||
('', method),
|
||||
|
||||
Reference in New Issue
Block a user