Send a reply using RTM API

            (This function doesn't supports formatted message
            when using a bot integration)
427109
def send(self, text, thread_ts=None):
        
        self._client.rtm_send_message(self._body['channel'], text, thread_ts=thread_ts)
874387
def send(self, sender: PytgbotApiBot):
        
        return sender.send_video(
            # receiver, self.media, disable_notification=self.disable_notification, reply_to_message_id=reply_id
            video=self.video, chat_id=self.receiver, reply_to_message_id=self.reply_id, duration=self.duration, width=self.width, height=self.height, thumb=self.thumb, caption=self.caption, parse_mode=self.parse_mode, supports_streaming=self.supports_streaming, disable_notification=self.disable_notification, reply_markup=self.reply_markup
        )
73221
def send(self, sender: PytgbotApiBot):
        
        return sender.send_document(
            # receiver, self.media, disable_notification=self.disable_notification, reply_to_message_id=reply_id
            document=self.document, chat_id=self.receiver, reply_to_message_id=self.reply_id, thumb=self.thumb, caption=self.caption, parse_mode=self.parse_mode, disable_notification=self.disable_notification, reply_markup=self.reply_markup
        )
1034542
def send(self, sender: PytgbotApiBot):
        
        return sender.send_video_note(
            # receiver, self.media, disable_notification=self.disable_notification, reply_to_message_id=reply_id
            video_note=self.video_note, chat_id=self.receiver, reply_to_message_id=self.reply_id, duration=self.duration, length=self.length, thumb=self.thumb, disable_notification=self.disable_notification, reply_markup=self.reply_markup
        )
1188207
function receiveMessageWithApiai(messageText, senderID, event) {
    var trequest = apiaiapp.textRequest(messageText, {
        sessionId: senderID
    });
    trequest.on('response', function(response) {
      
        var message = janis.convertFromApiaiResponseToMessage(response);
        var messageData = {
            recipient: {
                id: senderID
            },
            message: message
        }
        callSendAPI(messageData);

        if (response.result.action == "human") {
            // send a janis alert to your slack channel
            // that the user could use assistance
            janis.assistanceRequested(event);
        } else if (response.result.action == "input.unknown" ||
            (response.result.metadata.intentId == null && response.result.fulfillment.speech == "")) {
            //associate an action in api.ai with your fallback intents so you can catch them.
            //in this example, "input.unknown" is the action set in api.ai on the Default Fallback Intent.
          
            //capture conversational ‘dead-ends’ 
            //and send janis an alert to your slack channel
            janis.logUnknownIntent(event);
        }
    });
    trequest.on('error', function(error) {
        console.log(error);
        //capture conversational ‘dead-ends’ 
        //and send janis an alert to your slack channel
        janis.logUnkownIntent(event);
        sendTextMessage(senderID, error.message);
    });
    trequest.end();
}
335322
def _handle_command_response(self, res, event):
        

        response_handler = None

        if isinstance(res, basestring):
            response_handler = functools.partial(self._send_rtm_message, event['channel'])
        elif isinstance(res, dict):
            response_handler = self._send_api_message

        if response_handler is not None:
            response_handler(res)
556369
async def get_reply(self, message=None, *, timeout=None):
        
        return await self._get_message(
            message, self._reply_indices, self._pending_replies, timeout,
            lambda x, y: x.reply_to_msg_id == y
        )
771622
def send(self, sender: PytgbotApiBot):
        
        return sender.send_contact(
            # receiver, self.media, disable_notification=self.disable_notification, reply_to_message_id=reply_id
            phone_number=self.phone_number, first_name=self.first_name, chat_id=self.receiver, reply_to_message_id=self.reply_id, last_name=self.last_name, vcard=self.vcard, disable_notification=self.disable_notification, reply_markup=self.reply_markup
        )
834159
def send(self, sender: PytgbotApiBot):
        
        return sender.send_message(
            # receiver, self.media, disable_notification=self.disable_notification, reply_to_message_id=reply_id
            text=self.text, chat_id=self.receiver, reply_to_message_id=self.reply_id, parse_mode=self.parse_mode, disable_web_page_preview=self.disable_web_page_preview, disable_notification=self.disable_notification, reply_markup=self.reply_markup
        )
341236
def reply(self, text):
        
        data = {
            'thing_id': self.name,
            'id': '#commentreply_{0}'.format(self.name),
            'text': text,
        }
        j = self._reddit.post('api', 'comment', data=data)
        try:
            return self._reddit._thingify(j['json']['data']['things'][0], path=self._path)
        except Exception:
            raise UnexpectedResponse(j)
695672
def reply(self, text):
        
        data = {'text': text, 'vchannel_id': self['vchannel_id']}
        if self.is_p2p():
            data['type'] = RTMMessageType.P2PMessage
            data['to_uid'] = self['uid']
        else:
            data['type'] = RTMMessageType.ChannelMessage
            data['channel_id'] = self['channel_id']
        return RTMMessage(data)
457522
function getReply(req, res) {
	// Get data from the JSON post.
	var username = req.body.username;
	var message  = req.body.message;
	var vars     = req.body.vars;

	// Make sure username and message are included.
	if (typeof(username) === "undefined" || typeof(message) === "undefined") {
		return error(res, "username and message are required keys");
	}

	// Copy any user vars from the post into RiveScript.
	if (typeof(vars) !== "undefined") {
		for (var key in vars) {
			if (vars.hasOwnProperty(key)) {
				bot.setUservar(username, key, vars[key]);
			}
		}
	}

	// Get a reply from the bot.
	bot.reply(username, message, this).then(function(reply) {
		// Get all the user's vars back out of the bot to include in the response.
		vars = bot.getUservars(username);

		// Send the JSON response.
		res.json({
			"status": "ok",
			"reply": reply,
			"vars": vars
		});
	}).catch(function(err) {
		res.json({
			"status": "error",
			"error": err
		});
	});
}
949576
def send_message(self, threadid, msgFormat, message):
        '''  '''
        # using deprecated v3 message create because of bug in codegen of v4 ( multipart/form-data )
        response, status_code = self.__agent__.Messages.post_v3_stream_sid_message_create(
            sessionToken=self.__session__,
            keyManagerToken=self.__keymngr__,
            sid=threadid,
            message={"format": msgFormat,
                     "message": message}
        ).result()
        self.logger.debug('%s: %s' % (status_code, response))
        return status_code, response
1161012
def send(self, sender: PytgbotApiBot):
        
        return sender.send_location(
            # receiver, self.media, disable_notification=self.disable_notification, reply_to_message_id=reply_id
            latitude=self.latitude, longitude=self.longitude, chat_id=self.receiver, reply_to_message_id=self.reply_id, live_period=self.live_period, disable_notification=self.disable_notification, reply_markup=self.reply_markup
        )
361092
def send(self, sender: PytgbotApiBot):
        
        return sender.send_invoice(
            # receiver, self.media, disable_notification=self.disable_notification, reply_to_message_id=reply_id
            title=self.title, description=self.description, payload=self.payload, provider_token=self.provider_token, start_parameter=self.start_parameter, currency=self.currency, prices=self.prices, chat_id=self.receiver, reply_to_message_id=self.reply_id, provider_data=self.provider_data, photo_url=self.photo_url, photo_size=self.photo_size, photo_width=self.photo_width, photo_height=self.photo_height, need_name=self.need_name, need_phone_number=self.need_phone_number, need_email=self.need_email, need_shipping_address=self.need_shipping_address, send_phone_number_to_provider=self.send_phone_number_to_provider, send_email_to_provider=self.send_email_to_provider, is_flexible=self.is_flexible, disable_notification=self.disable_notification, reply_markup=self.reply_markup
        )
1099926
def edit_reply_markup(self, message_id, markup):
        
        return self.bot.edit_message_reply_markup(
            self.id, message_id, reply_markup=self.bot.json_serialize(markup)
        )
324009
def deliver(bot, message)
      channel = bot.Channel(message.channel.name)
      message.format.to_a.each do |msg|
        channel.send msg
      end
    end