parameters: (self, serviceName, data)
docstring: Sends a bot publish to all subscribed users.
docstring_summary: Sends a bot publish to all subscribed users.
docstring_tokens: Sends a bot publish to all subscribed users .
function: def on_bot_publish(self, serviceName, data):
          '''Sends a bot publish to all subscribed users.'''
          # get the bot state
          bot = self.activeBots[serviceName]
          # ensure bot in proper state
          if not bot.is_subscribed():
              raise ValueError('bot not subscribed')
  
          # build the publish message
          msg = {
              'channel' : '/bot/%s' % serviceName,
              'data' : {
                  'value' : data
              }
          }
          # queue publish for clients
          self.session.publish(msg)
function_tokens: def on_bot_publish ( self , serviceName , data ) : # get the bot state bot = self . activeBots [ serviceName ] # ensure bot in proper state if not bot . is_subscribed ( ) : raise ValueError ( 'bot not subscribed' ) # build the publish message msg = { 'channel' : '/bot/%s' % serviceName , 'data' : { 'value' : data } } # queue publish for clients self . session . publish ( msg )