From c07a1e28bd24f76dff51737de3bb0e122830795e Mon Sep 17 00:00:00 2001 From: Luna Date: Wed, 20 Mar 2019 03:42:11 -0300 Subject: [PATCH] system_messages: add docstring for send_sys_message --- litecord/system_messages.py | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/litecord/system_messages.py b/litecord/system_messages.py index 0f13b8e..a9e1cab 100644 --- a/litecord/system_messages.py +++ b/litecord/system_messages.py @@ -133,7 +133,26 @@ async def _handle_gdm_icon_edit(app, channel_id, author_id): async def send_sys_message(app, channel_id: int, m_type: MessageType, *args, **kwargs) -> int: - """Send a system message.""" + """Send a system message. + + The handler for a given message type MUST return an integer, that integer + being the message ID generated. This function takes care of feching the + message and dispatching the needed event. + + Parameters + ---------- + app + The app instance. + channel_id + The channel ID to send the system message to. + m_type + The system message's type. + + Returns + ------- + int + The message ID. + """ try: handler = { MessageType.CHANNEL_PINNED_MESSAGE: _handle_pin_msg,