Add documentation for Message.editMessage

This commit is contained in:
SeanOMik 2020-06-18 15:46:22 -05:00
parent fb71f31ea5
commit 4af2f4f711
No known key found for this signature in database
GPG Key ID: FA4D55AC05268A88
1 changed files with 1 additions and 0 deletions

View File

@ -201,6 +201,7 @@ proc removeAllReactions*(message: Message, emoji: Emoji) {.asnyc.} =
#TODO: Embeds and maybe flags?
proc editMessage*(message: Message, content: string): Future[Message] {.async.} =
## Edit a previously sent message.
let jsonBody = %*{"content": content}
return newMessage(sendRequest(endpoint("/channels/" & $message.channelID & "/messages/" & $message.id),
HttpPatch, defaultHeaders(newHttpHeaders({"Content-Type": "application/json"})),