Did I find the right examples for you? yes no

All Samples(12)  |  Call(12)  |  Derive(0)  |  Import(0)

src/m/u/mumble-bots-HEAD/mumble/advance_bot.py   mumble-bots(Download)
  def on_command_set(self, from_user, name, value, *_):
    """Set a local variable."""
    self.vars[name] = value
    self.send_message(from_user, '\'%s\' = \'%s\'' % (name, self.vars[name]))
 
  def on_command_get(self, from_user, name, *_):
    """Get the value of a local variable."""
    if name in self.vars:
      self.send_message(from_user, '\'%s\' = \'%s\'' % (name, self.vars[name]))
      self.send_message(from_user, '\'%s\' = \'%s\'' % (name, self.vars[name]))
    else:
      self.send_message(from_user, '\'%s\' doesn\'t exist.' % (
          name))
 
  def on_command_list_var(self, from_user, *_):
    self.send_message(from_user, 'Vars: %s' % self.vars.keys())
  def on_command_add_right(self, from_user, name, command, *_):
    target = self.get_user_by_name(name)
    if target is None:
      self.send_message(from_user, 'User not found: \'%s\'' % name)
    if target.id is None: