From d3ed886b8adda2045eb3382324765e67214c28a7 Mon Sep 17 00:00:00 2001 From: Victor Kotlin Date: Sun, 19 Sep 2021 12:11:14 +0300 Subject: [PATCH] update some docs --- docs/reference.rst | 98 ++++++++++++---------------------------------- 1 file changed, 25 insertions(+), 73 deletions(-) diff --git a/docs/reference.rst b/docs/reference.rst index ad423e7..a0ca434 100644 --- a/docs/reference.rst +++ b/docs/reference.rst @@ -2,6 +2,9 @@ .. reference: +Reference +============== + Event Reference --------------- Example of event creation: @@ -32,80 +35,29 @@ You can name the function whatever you want, but the decorator must always speci errors. In order to turn a function into a coroutine they must be ``async def`` functions. -**new_bot_bump** -Called when the user bumps the bot. ++------------------------+----------------------------------+ +| Boticord Events | Returns Type | ++========================+==================================+ +| new_bot_comment | types.Comment | ++------------------------+----------------------------------+ +| edit_bot_comment | types.EditedComment | ++------------------------+----------------------------------+ +| delete_bot_comment | types.Comment | ++------------------------+----------------------------------+ +| new_bot_bump | types.BotVote | ++------------------------+----------------------------------+ +| new_server_comment | Raw Data | ++------------------------+----------------------------------+ +| edit_server_comment | Raw Data | ++------------------------s+---------------------------------+ +| delete_server_comment | Raw Data | ++------------------------+----------------------------------+ -Return Example: - -:: +You can find more events in Boticord Documentation. - { - 'type': 'new_bot_bump', - 'data': { - 'user': '809377165534822410', - 'at': 1631436624444 - } - } - -**new_bot_comment** - -Called when the user creates new comment. - -Return Example: - -:: - - - { - 'type': 'new_bot_comment', - 'data': { - 'user': '704373738086465607', - 'comment': { - 'old': None, - 'new': 'boticord po jizni top' - }, - 'at': 1631439995678 - } - } - - -**edit_bot_comment** - -Called when the user edits his comment. - -Return Example: - -:: - - { - 'type': 'edit_bot_comment', - 'data': { - 'user': '585766846268047370', - 'comment': { - 'old': 'Boticord eto horosho', - 'new': 'Boticord horoshiy monitoring' - }, - 'at': 1631438224813 - } - } - -**delete_bot_comment** - -Called when the user deletes his comment. - -Return Example: - -:: - - { - 'type': 'delete_bot_comment', - 'data': { - 'user': '704373738086465607', - 'comment': 'допустим что я картофель', - 'vote': 1, - 'reason': 'self', - 'at': 1631439759384 - } - } +Types +------------ +.. autoclass:: boticordpy.types + :members: