func GetChannelMessages(client httd.Getter, channelID Snowflake, params URLParameters) (ret []*Message, err error) {
	if channelID.Empty() {
		err = errors.New("channelID must be set to get channel messages")
		return
	}
	query := ""
	if params != nil {
		query += params.GetQueryString()
	}

	_, body, err := client.Get(&httd.Request{
		Ratelimiter: ratelimitChannelMessages(channelID),
		Endpoint:    endpoint.ChannelMessages(channelID) + query,
	})
	if err != nil {
		return
	}

	err = unmarshal(body, &ret)
	return
}
// GetChannelMessages [GET] Returns the messages for a channel. If operating on a guild channel, this
//                          endpoint requires the 'VIEW_CHANNEL' permission to be present on the current
//                          user. If the current user is missing the 'READ_MESSAGE_HISTORY' permission
//                          in the channel then this will return no messages (since they cannot read
//                          the message history). Returns an array of message objects on success.
// Endpoint                 /channels/{channel.id}/messages
// Rate limiter [MAJOR]     /channels/{channel.id}/messages
// Discord documentation    https://discordapp.com/developers/docs/resources/channel#get-channel-messages
// Reviewed                 2018-06-10
// Comment                  The before, after, and around keys are mutually exclusive, only one may
//                          be passed at a time. see ReqGetChannelMessagesParams.
GetChannelMessages [GET] Returns the messages for a channel. If operating on a guild channel, this
endpoint requires the 'VIEW_CHANNEL' permission to be present on the current
user. If the current user is missing the 'READ_MESSAGE_HISTORY' permission
in the channel then this will return no messages (since they cannot read
the message history). Returns an array of message objects on success.
// GetChannelMessages [ GET ] Returns the messages for a channel . If operating on a guild channel this // endpoint requires the ' VIEW_CHANNEL ' permission to be present on the current // user . If the current user is missing the ' READ_MESSAGE_HISTORY ' permission // in the channel then this will return no messages ( since they cannot read // the message history ) . Returns an array of message objects on success . // Endpoint / channels / { channel . id } / messages // Rate limiter [ MAJOR ] / channels / { channel . id } / messages // Discord documentation https : // discordapp . com / developers / docs / resources / channel#get - channel - messages // Reviewed 2018 - 06 - 10 // Comment The before after and around keys are mutually exclusive only one may // be passed at a time . see ReqGetChannelMessagesParams .
func GetChannelMessages(client httd.Getter, channelID Snowflake, params URLParameters) (ret []*Message, err error) {
	if channelID.Empty() {
		err = errors.New("channelID must be set to get channel messages")
		return
	}
	query := ""
	if params != nil {
		query += params.GetQueryString()
	}
	_, body, err := client.Get(&httd.Request{
		Ratelimiter: ratelimitChannelMessages(channelID),
		Endpoint:    endpoint.ChannelMessages(channelID) + query,
	})
	if err != nil {
		return
	}
	err = unmarshal(body, &ret)
	return
}
func GetChannelMessages ( client httd . Getter , channelID Snowflake , params URLParameters ) ( ret [ ] * Message , err error ) { if channelID . Empty ( ) { err = errors . New ( " " ) return } query := " " if params != nil { query += params . GetQueryString ( ) } _ , body , err := client . Get ( & httd . Request { Ratelimiter : ratelimitChannelMessages ( channelID ) , Endpoint : endpoint . ChannelMessages ( channelID ) + query , } ) if err != nil { return } err = unmarshal ( body , & ret ) return }
GetChannelMessages [GET] Returns the messages for a channel.
GetChannelMessages [ GET ] Returns the messages for a channel .