From 1aab7f3fcb7827441053b6c9f37c14a45fd8f1fb Mon Sep 17 00:00:00 2001 From: Victor Kotlin Date: Sun, 12 Sep 2021 13:32:06 +0300 Subject: [PATCH] update docs --- docs/reference.rst | 104 ++++++++++++++++++++++++++++----------------- 1 file changed, 65 insertions(+), 39 deletions(-) diff --git a/docs/reference.rst b/docs/reference.rst index d159d4a..95ddbbb 100644 --- a/docs/reference.rst +++ b/docs/reference.rst @@ -32,52 +32,78 @@ 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. -.. function:: new_bot_bump +**new_bot_bump** - Called when the user bumps the bot. +Called when the user bumps the bot. - Return Example: ``{type': 'new_bot_bump', - 'data': { - 'user': '809377165534822410', - 'at': 1631436624444} - }`` +Return Example: -.. function:: 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} - }`` +:: -.. function:: edit_bot_comment + {type': 'new_bot_bump', + 'data': { + 'user': '809377165534822410', + 'at': 1631436624444 + } + } - Called when the user edits his comment. +**new_bot_comment** - Return Example: ``{ - 'type': 'edit_bot_comment', - 'data': { - 'user': '585766846268047370', - 'comment': { - 'old': 'Boticord eto horosho', - 'new': 'Boticord horoshiy monitoring'}, - 'at': 1631438224813}}`` +Called when the user creates new comment. -.. function:: delete_bot_comment +Return Example: - Called when the user deletes his comment. +:: - Return Example: ``{ - 'type': 'delete_bot_comment', - 'data': { - 'user': '704373738086465607', - 'comment': 'допустим что я картофель', - 'vote': 1, - 'reason': 'self', - 'at': 1631439759384}} + + {'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 + } + }