update docs

This commit is contained in:
Victor Kotlin 2021-09-12 13:32:06 +03:00
parent d5f1e27cbc
commit 1aab7f3fcb

View file

@ -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`` errors. In order to turn a function into a coroutine they must be ``async def``
functions. 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', Return Example:
::
{type': 'new_bot_bump',
'data': { 'data': {
'user': '809377165534822410', 'user': '809377165534822410',
'at': 1631436624444} 'at': 1631436624444
}`` }
}
.. function:: new_bot_comment **new_bot_comment**
Called when the user creates new comment. Called when the user creates new comment.
Return Example: ``{'type': 'new_bot_comment', Return Example:
::
{'type': 'new_bot_comment',
'data': { 'data': {
'user': '704373738086465607', 'user': '704373738086465607',
'comment': { 'comment': {
'old': None, 'old': None,
'new': 'boticord po jizni top'}, 'new': 'boticord po jizni top'
'at': 1631439995678} },
}`` 'at': 1631439995678
}
}
.. function:: edit_bot_comment **edit_bot_comment**
Called when the user edits his comment. Called when the user edits his comment.
Return Example: ``{ Return Example:
::
{
'type': 'edit_bot_comment', 'type': 'edit_bot_comment',
'data': { 'data': {
'user': '585766846268047370', 'user': '585766846268047370',
'comment': { 'comment': {
'old': 'Boticord eto horosho', 'old': 'Boticord eto horosho',
'new': 'Boticord horoshiy monitoring'}, 'new': 'Boticord horoshiy monitoring'
'at': 1631438224813}}`` },
'at': 1631438224813
}
}
.. function:: delete_bot_comment **delete_bot_comment**
Called when the user deletes his comment. Called when the user deletes his comment.
Return Example: ``{ Return Example:
::
{
'type': 'delete_bot_comment', 'type': 'delete_bot_comment',
'data': { 'data': {
'user': '704373738086465607', 'user': '704373738086465607',
'comment': 'допустим что я картофель', 'comment': 'допустим что я картофель',
'vote': 1, 'vote': 1,
'reason': 'self', 'reason': 'self',
'at': 1631439759384}} 'at': 1631439759384
}
}