func (c *Client) GetChannelID(channel string) (string, error) {
	chs, err := c.api.GetChannels(true)
	if err != nil {
		return "", errors.Wrap(err, "failed to list Slack channels")
	}

	for _, ch := range chs {
		if ch.Name == channel {
			return ch.ID, nil
		}
	}

	return "", errors.Errorf("channel %s is not found", channel)
}
// GetChannelID retrieves internal ID of the given channel
GetChannelID retrieves internal ID of the given channel
// GetChannelID retrieves internal ID of the given channel
func (c *Client) GetChannelID(channel string) (string, error) {
	chs, err := c.api.GetChannels(true)
	if err != nil {
		return "", errors.Wrap(err, "failed to list Slack channels")
	}
	for _, ch := range chs {
		if ch.Name == channel {
			return ch.ID, nil
		}
	}
	return "", errors.Errorf("channel %s is not found", channel)
}
func ( c * Client ) GetChannelID ( channel string ) ( string , error ) { chs , err := c . api . GetChannels ( true ) if err != nil { return " " , errors . Wrap ( err , " " ) } for _ , ch := range chs { if ch . Name == channel { return ch . ID , nil } } return " " , errors . Errorf ( " " , channel ) }
GetChannelID retrieves internal ID of the given channel
GetChannelID retrieves internal ID of the given channel