added edit message function.
This commit is contained in:
parent
a438e72086
commit
033ca53ec5
11
message.go
11
message.go
@ -71,3 +71,14 @@ type MessageEmbeddedVideo struct {
|
|||||||
Width int `json:"width"`
|
Width int `json:"width"`
|
||||||
Height int `json:"height"`
|
Height int `json:"height"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Edit message content.
|
||||||
|
func (m *Message) Edit(content string) error {
|
||||||
|
_, err := m.Client.Request("PATCH", "/channels/"+m.ChannelId+"/messages/"+m.Id, []byte("{\"content\": \""+content+"\"}"))
|
||||||
|
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user