Reacts to a message.
 @param reaction [String, #to_reaction] the unicode emoji or {Emoji}
358004
def create_reaction(reaction)
      reaction = reaction.to_reaction if reaction.respond_to?(:to_reaction)
      API::Channel.create_reaction(@bot.token, @channel.id, @id, reaction)
      nil
    end
963211
def _result_handler(self, response: Dict[str, Any]):
        
        res = response.get("MESSAGE")
        result = res.get("RESULT")
        return result
544562
def render_to_string(*)
      result = super
      if result.respond_to?(:each)
        string = +""
        result.each { |r| string << r }
        string
      else
        result
      end
    end
279496
def reply(self, message: typing.Union[int, types.Message]):
        
        setattr(self, 'reply_to_message_id', message.message_id if isinstance(message, types.Message) else message)
        return self
298051
def poll(poll, msg, server):
    """"""
    poll = remove_smart_quotes(poll.replace(u"\u2014", u"--"))

    try:
        args = ARGPARSE.parse_args(shlex.split(poll)).poll
    except ValueError:
        return ERROR_INVALID_FORMAT

    if not 2 < len(args) < len(POLL_EMOJIS) + 1:
        return ERROR_WRONG_NUMBER_OF_ARGUMENTS

    result = ["Poll: {}\n".format(args[0])]
    for emoji, answer in zip(POLL_EMOJIS, args[1:]):
        result.append(":{}: {}\n".format(emoji, answer))

    # for this we are going to need to post the message to Slack via Web API in order to
    #  get the TS and add reactions
    msg_posted = server.slack.post_message(
        msg['channel'], "".join(result), as_user=server.slack.username)
    ts = json.loads(msg_posted)["ts"]
    for i in range(len(args) - 1):
        server.slack.post_reaction(msg['channel'], ts, POLL_EMOJIS[i])
1204552
function(err, data, response) {

				// call the 'response' callback, if provided using 'node' style callback pattern
				if (options.complete) {
					options.complete.call(model, err, data, response, options);
				}

				// trigger any event listeners for "complete"
				model.trigger('complete', err, data, response, options);
			}
1330751
public void okResponse(String responseCode, String message) {
        untagged();
        message(OK);
        responseCode(responseCode);
        message(message);
        end();
    }
382344
def reply(self, text):
        
        # pylint: disable=W0212
        response = self.reddit_session._add_comment(self.fullname, text)
        # pylint: enable=W0212
        urls = [self.reddit_session.config['inbox']]
        if isinstance(self, Comment):
            urls.append(self.submission._api_link)  # pylint: disable=W0212
        elif isinstance(self, Message):
            urls.append(self.reddit_session.config['sent'])
        self.reddit_session.evict(urls)
        return response
1166047
def post_reaction(self, channel_id, timestamp, reaction_name, **kwargs):
        
        params = {
            "post_data": {
                "name": reaction_name,
                "channel": channel_id,
                "timestamp": timestamp,
            }
        }
        params["post_data"].update(kwargs)

        return self.api_call("reactions.add", **params)
837362
def chat_react(self, msg_id, emoji='smile', **kwargs):
        """"""
        return self.__call_api_post('chat.react', messageId=msg_id, emoji=emoji, kwargs=kwargs)
1267354
def action(text)
      line = text.to_s.each_line.first.chomp
      @bot.irc.send("PRIVMSG #@name :\001ACTION #{line}\001")
    end
757472
function onResponse( response ) {
		if ( response.statusCode !== 200 ) {
			err = {
				'status': response.statusCode,
				'message': ''
			};
		}
		debug( 'Received a response from query endpoint.' );
		debug( 'Response status: %s.', response.statusCode );
		debug( 'Response headers: %s', JSON.stringify( response.headers ) );

		response.setEncoding( 'utf8' );
		response.on( 'data', onData );
		response.on( 'end', onEnd );
	}
321040
def respond_to?(method_name, _include_all = false)
      if attrs.key?(method_name.to_s)
        true
      else
        super(method_name)
      end
    end
335372
function _handleTags(username, tags, cb) {
    var self = this;

    self.userData = tags;
    self.userData.username = username;
    self.userData.special = [];

    if (typeof tags['emotes'] === 'string') {
        var emoticons = tags['emotes'].split('/');
        var emotes = {};

        for (var i = 0; i < emoticons.length; i++) {
            var parts = emoticons[i].split(':');
            emotes[parts[0]] = parts[1].split(',');
        }
        self.userData.emote = emotes;
    }

    if (tags['subscriber'] === '1') { self.userData.special.push('subscriber'); }
    if (tags['turbo'] === '1') { self.userData.special.push('turbo'); }
    if (typeof tags['user_type'] === 'string') { self.userData.special.push(tags['user_type']); }

    if (typeof cb == "function") {
        return cb(self.userData);
    }
}
1114480
def respond_to?(method_sym, include_private = false)
      method_name = method_sym.to_s
      case 
        when KNOWN_ELEMENTS.include?(method_name.gsub(/^uniq_/,''))
          # page_object.uniq_xxx(hash)
          true
        when has_eset?(method_name)
          # page_object.some_elements_set
          true
        when has_element?(method_name)
          # page_object.some_element
          true
        when FEED_ALL.match(method_name)
          # page_object.feed_all(:fresh_food)
          true
        when (FEED.match(method_name) and has_eset?($1))
          # page_object.feed_some_elements_set(:fresh_food)
          true
        when (FEED.match(method_name) and has_element?($1))
          # page_object.feed_some_element(:fresh_food)
          true
        when (FIRE_ACTION.match(method_name) and has_action?($1))
          # page_object.fire_some_action
          true
        when (FIRE_ACTION.match(method_name) and has_alias?($1))
          # page_object.fire_some_action
          true
        when (VALIDATE.match(method_name) and has_action?($1))
          # page_object.validate_xxx
          true
        when (SELECT_FROM.match(method_name) and has_table?($1))
          # page_object.select_from_some_table(:header_column, {:column => 'value'})
          true
        when (SELECT_ROW_FROM.match(method_name) and has_table?($1))
          # page_object.select_from_some_table(:header_column, {:column => 'value'})
          true
        when (PAGINATION_EACH.match(method_name) and has_pagination?($1))
          # page_object.each_pagination
          true
        when (PAGINATION_OPEN.match(method_name) and has_pagination?($1))
          # page_object.open_padination(1)
          true
        when (PRESS.match(method_name) and has_element?($1))
          # page_object.press_element
          true
        else
          super
      end
    end
964251
def handle(handler, msg, sender, &block)
      @session.validate! sender if handler.validate?

      next_state, reply = handler.handle msg, @state, @session, sender

      return if abort_state_change?(next_state, &block)
      @state = next_state

      return unless reply

      sender.reply reply + "\r"
      logger.debug reply
    rescue Session::InvalidSender => e
      sender.reply "?\r"
      logger.warn e.message
    end
1176148
public void handleResponse(String response) {
        if (messageListener != null) {
            log.debug("Sending Http response");
            messageListener.onOutboundMessage(new RawMessage(response), null);
        } else {
            if (log.isDebugEnabled()) {
                log.debug("Sending Http response:" + NEWLINE + response);
            }
        }
    }