diff options
author | 2021-10-29 03:19:37 +0400 | |
---|---|---|
committer | 2021-10-29 03:19:37 +0400 | |
commit | 367c01a7b3cd5cc5ee25644ae92f917ceb00562c (patch) | |
tree | 3be351f403e75d56eb7b08a5e20aa432b2a64ec5 /pydis_site/apps/api/viewsets | |
parent | Merge pull request #617 from python-discord/mbaruh-patch-1 (diff) |
Adds Failures Field To Reminders
Adds an integer field to reminders, to keep track of how many failed
attempts at delivering the reminder were made.
Updates documentation and serialization.
Signed-off-by: Hassan Abouelela <[email protected]>
Diffstat (limited to 'pydis_site/apps/api/viewsets')
-rw-r--r-- | pydis_site/apps/api/viewsets/bot/reminder.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/pydis_site/apps/api/viewsets/bot/reminder.py b/pydis_site/apps/api/viewsets/bot/reminder.py index 111660d9..78d7cb3b 100644 --- a/pydis_site/apps/api/viewsets/bot/reminder.py +++ b/pydis_site/apps/api/viewsets/bot/reminder.py @@ -42,7 +42,8 @@ class ReminderViewSet( ... 'expiration': '5018-11-20T15:52:00Z', ... 'id': 11, ... 'channel_id': 634547009956872193, - ... 'jump_url': "https://discord.com/channels/<guild_id>/<channel_id>/<message_id>" + ... 'jump_url': "https://discord.com/channels/<guild_id>/<channel_id>/<message_id>", + ... 'failures': 3 ... }, ... ... ... ] @@ -67,7 +68,8 @@ class ReminderViewSet( ... 'expiration': '5018-11-20T15:52:00Z', ... 'id': 11, ... 'channel_id': 634547009956872193, - ... 'jump_url': "https://discord.com/channels/<guild_id>/<channel_id>/<message_id>" + ... 'jump_url': "https://discord.com/channels/<guild_id>/<channel_id>/<message_id>", + ... 'failures': 3 ... } #### Status codes @@ -80,7 +82,7 @@ class ReminderViewSet( #### Request body >>> { ... 'author': int, - ... 'mentions': List[int], + ... 'mentions': list[int], ... 'content': str, ... 'expiration': str, # ISO-formatted datetime ... 'channel_id': int, @@ -98,9 +100,10 @@ class ReminderViewSet( #### Request body >>> { - ... 'mentions': List[int], + ... 'mentions': list[int], ... 'content': str, - ... 'expiration': str # ISO-formatted datetime + ... 'expiration': str, # ISO-formatted datetime + ... 'failures': int ... } #### Status codes |