def send_message(self, channel, text):
if isinstance(channel, SlackIM) or isinstance(channel, SlackUser):<EOL><INDENT>self._bot.send_im(channel, text)<EOL><DEDENT>elif isinstance(channel, SlackRoom):<EOL><INDENT>self._bot.send_message(channel, text)<EOL><DEDENT>elif isinstance(channel, basestring):<EOL><INDENT>if channel[<NUM_LIT:0>] == '<STR_LIT:@>':<EOL><INDENT>self._bot.send_im(channel[<NUM_LIT:1>:], text)<EOL><DEDENT>elif channel[<NUM_LIT:0>] == '<STR_LIT:#>':<EOL><INDENT>self._bot.send_message(channel[<NUM_LIT:1>:], text)<EOL><DEDENT>else:<EOL><INDENT>self._bot.send_message(channel, text)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>self._bot.send_message(channel, text)<EOL><DEDENT>
Used to send a message to the specified channel.

* channel - can be a channel or user
* text - message to send