1
0
Fork 0
mirror of https://github.com/diamondburned/arikawa.git synced 2024-10-02 07:18:49 +00:00

api: Remove Client.SendText (#234)

SendMessage(a, b) is equivalent to SendText(a, b) so SendText is
redundant.

Programs using SendText can be updated with

    $ gofmt -r 'c.SendText(a, b) -> c.SendMessage(a, b)' -w .
This commit is contained in:
samhza 2021-06-22 20:48:16 -04:00 committed by GitHub
parent 17dbccccc3
commit 354199383a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -195,18 +195,6 @@ func (c *Client) Message(channelID discord.ChannelID, messageID discord.MessageI
EndpointChannels+channelID.String()+"/messages/"+messageID.String())
}
// SendText posts a text-only message to a guild text or DM channel.
//
// If operating on a guild channel, this endpoint requires the SEND_MESSAGES
// permission to be present on the current user.
//
// Fires a Message Create Gateway event.
func (c *Client) SendText(channelID discord.ChannelID, content string) (*discord.Message, error) {
return c.SendMessageComplex(channelID, SendMessageData{
Content: content,
})
}
// SendTextReply posts a text-only reply to a message ID in a guild text or DM channel
//
// If operating on a guild channel, this endpoint requires the SEND_MESSAGES