// SendWithReplies sends a textual message to a user, but gives them the option of numerous quick response options.
195958
func (m *Messenger) SendWithReplies(to Recipient, message string, replies []QuickReply, messagingType MessagingType, tags ...string) error {
	response := &Response{
		token: m.token,
		to:    to,
	}

	return response.TextWithReplies(message, replies, messagingType, tags...)
}
468790
func (m *FlexMessage) WithQuickReplies(items *QuickReplyItems) SendingMessage {
	m.quickReplyitems = items
	return m
}
1203774
func (c *Sender) AppendAndRepeatResponseWithDelay(resp *http.Response, delay time.Duration, repeat int) {
	c.appendAndRepeat(response{r: resp, d: delay}, repeat)
}
455810
func (r *Request) WithText(s string) *Request {
	if r.chain.failed() {
		return r
	}
	r.setType("WithText", "text/plain; charset=utf-8", false)
	r.setBody("WithText", strings.NewReader(s), len(s), false)
	return r
}
840843
func (m *AudioMessage) WithQuickReplies(items *QuickReplyItems) SendingMessage {
	m.quickReplyitems = items
	return m
}
108968
func (bot TgBot) SendAudioWithForceReply(cid int, audio string, duration *int, performer *string, title *string, rmi *int, rm ForceReply) ResultWithMessage {
	var rkm ReplyMarkupInt = rm
	return bot.SendAudio(cid, audio, duration, performer, title, rmi, &rkm)
}
1046252
func (m *LocationMessage) WithQuickReplies(items *QuickReplyItems) SendingMessage {
	m.quickReplyitems = items
	return m
}
1232952
func MessageWithExtras(level string, msg string, extras map[string]interface{}) {
	std.MessageWithExtras(level, msg, extras)
}
598324
func SendPackets(memif *libmemif.Memif, queueID uint8) {
	defer wg.Done()

	counter := 0
	for {
		select {
		case <-time.After(3 * time.Second):
			counter++
			// Prepare fake packets.
			packets := []libmemif.RawPacketData{
				libmemif.RawPacketData("Packet #1 in burst number " + strconv.Itoa(counter)),
				libmemif.RawPacketData("Packet #2 in burst number " + strconv.Itoa(counter)),
				libmemif.RawPacketData("Packet #3 in burst number " + strconv.Itoa(counter)),
			}
			// Send the packets. We may not be able to do it in one burst if the ring
			// is (almost) full or the internal buffer cannot contain it.
			sent := 0
			for {
				count, err := memif.TxBurst(queueID, packets[sent:])
				if err != nil {
					fmt.Printf("libmemif.Memif.TxBurst() error: %v\n", err)
					break
				} else {
					fmt.Printf("libmemif.Memif.TxBurst() has sent %d packets.\n", count)
					sent += int(count)
					if sent == len(packets) {
						break
					}
				}
			}
		case <-stopCh:
			return
		}
	}
}
291232
func (s *Sender) Send(req *http.Request) (resp *http.Response, err error) {
	return s.ExecWithRetry(fmt.Sprintf("%s request to %s", req.Method, req.URL), func() (*http.Response, error) { return s.client.Do(req) })
}
1327823
func (s *Action) RecipientsComplete(ctx context.Context, c *cli.Context) {
	tree, err := s.Store.RecipientsTree(out.WithHidden(ctx, true), false)
	if err != nil {
		fmt.Fprintln(stdout, err)
		return
	}

	for _, v := range tree.List(0) {
		fmt.Fprintln(stdout, v)
	}
}
1040928
func SendResponseWithClient(client interface {
	Do(*http.Request) (*http.Response, error)
}, req Request, response Response) error {
	c := ResponseClient{client}
	return c.SendResponse(req, response)
}
109309
func (i *Invoice) Send(b *Bot, to Recipient, opt *SendOptions) (*Message, error) {
	prices, _ := json.Marshal(i.Prices)

	params := map[string]string{
		"chat_id":         to.Recipient(),
		"title":           i.Title,
		"description":     i.Description,
		"start_parameter": i.Start,
		"payload":         i.Payload,
		"provider_token":  i.Token,
		"currency":        i.Currency,
		"prices":          string(prices),
	}
	embedSendOptions(params, opt)

	respJSON, err := b.Raw("sendInvoice", params)
	if err != nil {
		return nil, err
	}

	return extractMsgResponse(respJSON)
}
975339
func (r *ChainResponse) Send(response *restful.Response) {
	var keys []string
	for k := range r.chains {
		keys = append(keys, k)
	}
	sort.Strings(keys)

	for _, k := range keys {
		r.Chains = append(r.Chains, prepareChainResponse(r.Context, r.chains[k]))
	}

	r.Response.Send(response)
}
100849
func (b *Bot) ReplyWithAttachments(evt *slack.MessageEvent, attachments []slack.Attachment, typing bool) {
	params := slack.PostMessageParameters{AsUser: true}
	params.Attachments = attachments

	b.Client.PostMessage(evt.Msg.Channel, "", params)
}
260969
func WithRetries(req *http.Request, n int) *http.Request {
	ctx := req.Context()
	ctx = context.WithValue(ctx, contextKeyRetries, n)

	return req.WithContext(ctx)
}
217914
func (r SlashCommandResponse) Send(p *Payload) error {
	if p.ResponseUrl == "" {
		return fmt.Errorf("Empty ResponseUrl in Payload: %v", p)
	}
	return Message(r).sendToUrl(p.ResponseUrl)
}