code: def sleep(self, channel):
          
          self.log.info('Sleeping in %s', channel)
          self._bot.dispatcher.ignore(channel)
          self.send_message(channel, 'Good night')
docs: Causes the bot to ignore all messages from the channel.
  
          Usage:
          !sleep [channel name] - ignore the specified channel (or current if none specified)