//Say makes the bot say text to channel
503297
func (b *IrcBot) Say(channel string, text string) {
	msg := NewIrcMsg()
	msg.Command = "PRIVMSG"
	msg.CmdParams = []string{channel}
	msg.Trailing = []string{":", text}

	b.ChOut <- msg
}
266073
func (e *Event) Text() (string, error) {
	if e.Type != TextMessage {
		return "", errors.New("Event.Text() called on non-TextMessage event")
	}
	bts, err := ioutil.ReadAll(e)
	return string(bts), err
}
375281
func (c *ReactionsGetCall) Channel(channel string) *ReactionsGetCall {
	c.channel = channel
	return c
}
795958
func (c *ChatPostMessageCall) Text(text string) *ChatPostMessageCall {
	c.text = text
	return c
}
1096407
func (term *Terminal) Ask(question string) (bool, error) {
	input, err := term.Custom(question+"? (y/n)", func(input string) (string, bool) {
		if input == "" {
			return "", false
		}
		input = strings.ToLower(input)

		if input == "y" || input == "yes" {
			return "yes", true
		}

		return "", true
	})

	var ok bool
	if input != "" {
		ok = true
	}

	return ok, err
}
662696
func (c *Client) Send(msg Message) error {
	select {
	case c.send <- msg:
		return nil
	default:
		// No send channel means we have disconnected, time to
		// cleanup.
		return nil
	}
}
1336402
func (c *Commands) Call(cmdstr string, t *Term) error {
	ctx := callContext{Prefix: noPrefix, Scope: api.EvalScope{GoroutineID: -1, Frame: c.frame, DeferredCall: 0}}
	return c.CallWithContext(cmdstr, t, ctx)
}
498291
func Run(token string) {
	api = slack.New(token)
	rtm = api.NewRTM()
	teaminfo, _ = api.GetTeamInfo()

	b := bot.New(&bot.Handlers{
		Response: responseHandler,
	},
		&bot.Config{
			Protocol: protocol,
			Server:   teaminfo.Domain,
		},
	)

	b.Disable([]string{"url"})

	go rtm.ManageConnection()

Loop:
	for {
		select {
		case msg := <-rtm.IncomingEvents:
			switch ev := msg.Data.(type) {
			case *slack.HelloEvent:
				readBotInfo(api)
				readChannelData(api)
			case *slack.ChannelCreatedEvent:
				readChannelData(api)
			case *slack.ChannelRenameEvent:
				readChannelData(api)

			case *slack.MessageEvent:
				if !ev.Hidden && !ownMessage(ev.User) {
					C := channelList[ev.Channel]
					var channel = ev.Channel
					if C.IsChannel {
						channel = fmt.Sprintf("#%s", C.Name)
					}
					go b.MessageReceived(
						&bot.ChannelData{
							Protocol:  "slack",
							Server:    teaminfo.Domain,
							Channel:   channel,
							HumanName: C.Name,
							IsPrivate: !C.IsChannel,
						},
						extractText(ev),
						extractUser(ev),
					)
				}

			case *slack.RTMError:
				fmt.Printf("Error: %s\n", ev.Error())

			case *slack.InvalidAuthEvent:
				fmt.Printf("Invalid credentials")
				break Loop
			}
		}
	}
}
104848
func Pause(channel int) {
	_channel := (C.int)(channel)
	C.Mix_Pause(_channel)
}
309929
func (c *cmdable) Publish(channel string, message interface{}) *IntCmd {
	cmd := NewIntCmd("publish", channel, message)
	c.process(cmd)
	return cmd
}
538890
func (b *Bot) Reply(evt *slack.MessageEvent, msg string, typing bool) {
	if typing {
		b.Type(evt, msg)
	}
	b.RTM.SendMessage(b.RTM.NewOutgoingMessage(msg, evt.Channel))
}
771990
func (v *VideoNote) Send(b *Bot, to Recipient, opt *SendOptions) (*Message, error) {
	params := map[string]string{
		"chat_id": to.Recipient(),
	}

	if v.Duration != 0 {
		params["duration"] = strconv.Itoa(v.Duration)
	}
	if v.Length != 0 {
		params["length"] = strconv.Itoa(v.Length)
	}

	embedSendOptions(params, opt)

	msg, err := b.sendObject(&v.File, "videoNote", params, thumbnailToFilemap(v.Thumbnail))
	if err != nil {
		return nil, err
	}

	msg.VideoNote.File.stealRef(&v.File)
	*v = *msg.VideoNote

	return msg, nil
}
768553
func Talk(bot *cleverbot.Session, input string) (response string, err error) {
	response, err = bot.Ask(input)
	if err != nil {
		return
	}
	return
}
1122917
func (c *UserController) SayHelloWorld() {
	c.Ctx.ResponseWriter.Status = 200
	c.Ctx.ResponseWriter.Write([]byte("Hello, World"))
}
299917
func (c *ChatUpdateCall) Text(text string) *ChatUpdateCall {
	c.text = text
	return c
}
1255788
func (s *Send) Text(text string) *SendText {
	return &SendText{s, text, nil, nil, nil, nil}
}
1148357
func (c *Client) Publish(channel string, message interface{}) (int64, error) {
	var ret int64

	err := c.command(
		&ret,
		[]byte("PUBLISH"),
		[]byte(channel),
		to.Bytes(message),
	)

	return ret, err
}