// Sticker return a SendSticker instance to chain actions easy
976675
func (s *Send) Sticker(stick interface{}) *SendSticker {
	return &SendSticker{s, stick, nil, nil}
}
1364379
func (a *ActDepend) ChainAction(f ActionInterface) ActionInterface {
	return a.current().ChainAction(f)
}
109691
func (mod *EmailBee) Action(action bees.Action) []bees.Placeholder {
	outs := []bees.Placeholder{}

	switch action.Name {
	case "send":
		var from, to, plainText, htmlText, subject string
		action.Options.Bind("sender", &from)
		action.Options.Bind("recipient", &to)
		action.Options.Bind("subject", &subject)
		action.Options.Bind("text", &plainText)
		action.Options.Bind("html", &htmlText)

		m := mail.NewMessage()
		if len(from) > 0 {
			m.SetHeader("From", from)
		} else {
			m.SetHeader("From", mod.username)
		}
		m.SetHeader("To", to)
		m.SetHeader("Subject", subject)
		if plainText != "" {
			m.SetBody("text/plain", plainText)
		}
		if htmlText != "" {
			m.SetBody("text/html", htmlText)
		}

		host, portstr, err := net.SplitHostPort(mod.server)
		if err != nil {
			host = mod.server
			portstr = "587"
		}
		port, _ := strconv.Atoi(portstr)
		s, _ := mail.NewDialer(host, port, mod.username, mod.password).Dial()

		// Send the email.
		if err := mail.Send(s, m); err != nil {
			panic(err)
		}

	default:
		panic("Unknown action triggered in " + mod.Name() + ": " + action.Name)
	}

	return outs
}
1342368
func (bot TgBot) SendStickerWithKeyboardHide(cid int, sticker interface{}, rmi *int, rm ReplyKeyboardHide) ResultWithMessage {
	var rkm ReplyMarkupInt = rm
	return bot.SendSticker(cid, sticker, rmi, &rkm)
}
1312592
func (c *Client) CreateNewStickerSet(userID int, name, title, fileID, emojis string, opts ...sendOption) error {
	req := url.Values{}
	req.Set("user_id", fmt.Sprint(userID))
	req.Set("name", name)
	req.Set("title", title)
	req.Set("png_sticker", fileID)
	req.Set("emojis", emojis)
	for _, opt := range opts {
		opt(req)
	}
	var created bool
	return c.doRequest("createNewStickerSet", req, &created)
}
794854
func (t *MockTransactor) SendTransactionProposal(proposal *fab.TransactionProposal, targets []fab.ProposalProcessor) ([]*fab.TransactionProposalResponse, error) {
	response := make([]*fab.TransactionProposalResponse, 1)
	response[0] = &fab.TransactionProposalResponse{Endorser: "example.com", Status: 200,
		ProposalResponse: &pb.ProposalResponse{Response: &pb.Response{Message: "success", Payload: []byte("abc"), Status: http.StatusOK},
			Endorsement: &pb.Endorsement{Endorser: []byte("example.com"), Signature: []byte("signature")}},
	}
	return response, nil
}
1313374
func (issue *Issue) AddLabel(doer *User, label *Label) error {
	if err := NewIssueLabel(issue, label); err != nil {
		return err
	}

	issue.sendLabelUpdatedWebhook(doer)
	return nil
}
1025440
func (r *ActionResponse) AddAction(action *bees.Action) {
	r.actions = append(r.actions, action)
	r.Actions = append(r.Actions, prepareActionResponse(r.Context, action))
}
526419
func (a *AuthToken) stopTicker() {
	a.tickerMu.Lock()
	defer a.tickerMu.Unlock()

	if a.tickerCancel != nil {
		a.tickerCancel()
		a.tickerCancel = nil
	}
}
280788
func (b *Base) Formatter(m message.Composer) (string, error) {
	b.mutex.RLock()
	defer b.mutex.RUnlock()

	if b.formatter == nil {
		return m.String(), nil
	}

	return b.formatter(m)
}
555025
func (h *LabelHandler) handlePatchLabel(w http.ResponseWriter, r *http.Request) {
	ctx := r.Context()

	req, err := decodePatchLabelRequest(ctx, r)
	if err != nil {
		EncodeError(ctx, err, w)
		return
	}

	l, err := h.LabelService.UpdateLabel(ctx, req.LabelID, req.Update)
	if err != nil {
		EncodeError(ctx, err, w)
		return
	}

	if err := encodeResponse(ctx, w, http.StatusOK, newLabelResponse(l)); err != nil {
		logEncodingError(h.Logger, r, err)
		return
	}
}
184378
func (c *Context) SendAction(s string) error {
	_, err := c.Bot().API.Send(tg.NewChatAction(c.Chat.ID, s))
	return err
}
372442
func (s *sender) sendAck() {
	s.sendSegment(buffer.VectorisedView{}, header.TCPFlagAck, s.sndNxt)
}
255982
func (t *Transaction) sendAction(a *Action) error {
	switch a.kind {
	case commandAction:
		return t.conn.Send(a.name, a.args...)
	case scriptAction:
		return a.script.Send(t.conn, a.args...)
	}
	return nil
}
1064677
func (c *Connection) startTicker() {
	c.log("Pinging every %v, first at %v", LogLevelDebug, c.PingPeriod, time.Now().Add(c.PingPeriod))
	c.ticker = time.NewTicker(c.PingPeriod)
}
1089102
func (tm *TrustMetric) SetTicker(ticker MetricTicker) {
	tm.mtx.Lock()
	defer tm.mtx.Unlock()

	tm.testTicker = ticker
}
998862
func (r *Response) SenderAction(action string) error {
	m := SendSenderAction{
		Recipient:    r.to,
		SenderAction: action,
	}
	return r.DispatchMessage(&m)
}