code: def set_restriction(self, command, user, event_types):
          
          self.commands_rights[command][user.lower()] = event_types
          if command not in self.triggers:
              self.triggers[command] = [EVT_PUBLIC, EVT_PRIVATE, EVT_NOTICE]
          if not hasattr(self, command):
              setattr(self, command, lambda msg: self.handle_rights(msg))
docs: Adds restriction for given `command`.
  
          :param command: command on which the restriction should be set.
          :type command: str
          :param user: username for which the restriction applies.
          :type user: str
          :param event_types: types of events for which the command is allowed.
          :type event_types: list