mirror of
https://github.com/MrSedan/neuro-reply-bot-reworked.git
synced 2026-01-14 13:39:42 +03:00
Editing post in neuroapi
This commit is contained in:
@@ -48,3 +48,10 @@ class Post(ApiMethod):
|
|||||||
if 'statusCode' in data:
|
if 'statusCode' in data:
|
||||||
raise Exception(data['message'])
|
raise Exception(data['message'])
|
||||||
return data
|
return data
|
||||||
|
|
||||||
|
async def edit_text(self, post_id: str, text: str):
|
||||||
|
response = requests.post(self.api_url+f"/post/edit/{post_id}", data={"text": text})
|
||||||
|
data = response.json()
|
||||||
|
if 'statusCode' in data:
|
||||||
|
raise Exception(data['message'])
|
||||||
|
return data
|
||||||
Reference in New Issue
Block a user